The Apathy of the Lone Coder

I think I might be having a bit of a mid-life crisis. It’ll be my 35th birthday this year, and I’ve started to realise that I don’t really want to do much more of the Open Source’y stuff that I’ve been a part of for the past 10 or so years.

Don’t get me wrong. This isn’t me saying I want to hang up my linux user hat, put away the android phone, wipe the PHP manuals from my kindle or return an HTTP 410 code for everything I’ve ever published… but it’s getting close.

The rot has been setting in for some time.

November 2011 was the “first birthday” of CCHits.net – I’d planned to have my site-wide re-write of the whole code base ready for the birthday, but frankly, I’d massively underestimated the amount of work involved, so it wasn’t ready for November. As it was, a critical failure on my web host prompted me to “make” the rewrite work in April – nearly half a year after it was supposed to be in by. I’m not at all happy with the site layout, the way the tracks are build, the lack of adoption of the service by any other podcasters than the three who currently submit to the site (no criticisms there for anyone else, just a frustration really) and, well, the fact it never really achieved the vision I had for it.

In April, I helped to organise UCubed – a one day unconference about Linux and Open Source [1], held at MadLab, Manchester. We put less effort into organising it than we had the last few times, I pretty much wimped out on the day, taking my son to his swimming lesson (which meant leaving two hours after the event started, and returning an hour before it finished), and after the event, I felt like all I’d done was go to get the refreshments.

In July and August, I pulled a lot of 2 and 3AM finishes to get CampFireManager ready for OggCamp. I had some solid support from a guy called Jack who committed a load of great code to the project, plus loads of encouragement from the organisation team for OggCamp, the big day came, and, well, let’s just say there were issues. Quite a lot of issues really. I missed all of both mornings of talks because I was fire fighting those issues, and on the second day, I was held up as an example of “why not to code something instead of just doing it”. I had a top notch PHP engineer [2] sitting next to me while I was looking through issues, and even though I’ve gone through the theory of how the site works with her before, she couldn’t get her head around it. OK, I was skimming through the code pretty fast and I know most of it like the back of my hand so I knew roughly where code had gone and was going to next but still… code is code, right? Not if it’s crap code with unusual structure, insufficient testing, incomprehensible logic and, well, it’s just crap…

Before OggCamp, I inadvertently became the project lead for something I still don’t fully understand (although I’m a lot closer on it, to be fair): MOTP-AS. An implementation of the Mobile One Time PIN algorithm, written in PHP, tied up to a FreeRadius Server with a pretty web UI to give something a bit like RSA SecurID Authentication Manager server. Essentially, I made some suggestions on how to improve the code, and was told “Well, actually, we were pretty much going to kill off the project after the next release – do you want to take it over?” and I, in hindsight, stupidly said “Oh, OK”. I said that from October, I’d have “loads” of time, and was going to re-write the code base using Object Oriented principals, was going to roll in Unit Testing, PHPDocumentor and, theoretically, move to using a sensible framework to render the whole thing.

The hindsight thing I mentioned there? On the 28th August, my father passed away. I’ve not really talked about it much on Social Media. It’s a pretty hard thing to do, as it may mean airing an awful lot of dirty laundry as a result, but I guess the outcome of that was that I’ve been spending a lot more time away from my home, staying instead at my fathers home where I have been clearing it to sell it, and when I’ve not been away from home, I’ve wanted to spend more time with Jules and Daniel.

The first couple of trips down to my Dad’s house were on the train. I tried to break open a text editor and start turning out reusable PHP which I could form into something in MOTP-AS, but let’s be serious about this, it was like trying to read a book in the same circumstances – you just keep reading the same page over and over again, but nothing “right” comes out the other side. I’ve not had the enthusiasm to even start to look at that project since then.

Everyone I was working with – CCHits, CampFireManager, MOTP-AS – all knew I was offline, and would be “for some time”, but the funk that set in on that train hasn’t shifted yet, and I still can’t work out if it’s something to do with my Dad, or just the fact that I’m not really feeling the code right now.

At a recent PHPNW session, Lorna said (although I am paraphrasing) that most of my bad practices come from a lack of exposure to other PHP developers, and that working as part of a team towards something would help. My day job has nothing to do with coding (and there’s no scope to bring it into my role, and the few times I’ve tried to bring it in, it’s caused me more issues with my work than if I hadn’t) and 5% to do with open source software (the 5% is due to the OS that many of the devices we support are RedHat, BSD or Solaris based). I don’t want to, and can’t afford to make a career change now (aside from anything else, I still love my job, especially what I’m doing at the moment) to get that experience, and I’m getting closer and closer to burning out on the projects I’m involved in – just because there’s no one else who understands it like I do… which is sad.

When I do start to code in the evenings, what I tend to do is think of something I’d like to write (yep, starting a new project will fix *everything* Jon!), open my IDE, try and work out what I want to learn to use this time, and start reading the documentation for it… and not actually start working on the project. And then 2 hours have passed, I’ve done nothing, and frankly I could do with going to bed.

So, how do I beat this apathy folks. Is there anyone out there who can help?

I think if I’ve not sorted something out by June, I’ll close down CCHits.net. It’s been a great blast, but I’m so nervous of something going wrong with the system and it collapsing like a pack of cards… which is a real shame as HPR [3] have just said they’ll be running the daily shows in their Icecast server when “real” feeds aren’t being streamed, that and I love discovering, or re-discovering the music which is played through the system.

Likewise, I think I’ll probably try and find someone to hand CFM over to during OggCamp this year, and if I can’t find someone to hand it over to, I’ll shut it down. Again, it’s been fun, but I don’t need 2 months of sleepless nights and 2 days of sheer panic for something which ultimately could be replaced by a sheet of paper and some post-it notes.

Of all of the projects I’ve mentioned, the MOTP-AS part is most likely to be something of use to me in my day job (which was, in fact, how I came across it… for our lab network), so I might make more of an effort with that, but again, I really can’t see me being happy with it at the end of it all.

[1] It used to be about more than that, but frankly, it’s what it turned into.
[2] Plug for that top notch PHP engineer who, fortunately for me, was happy (or if not actually happy, appeared to be happy enough) to be an observer, a person to bounce ideas off, a muse and cheerleader (sort-of) for those two days of hell – http://LornaJane.net
[3] HackerPublicRadio.net – a podcast network made up from individual posts by the community.

Hacking Flattr support into StatusNet 0.9.5

So, recently I’ve really got into Flattr (from flattr.com) and I wanted to add a flattr icon to my StatusNet instance.

I’m running StatusNet 0.9.5 (hopefully Dreamhost will upgrade us to 1.x soon!) but for now, adding Flattr to that page means adding it to the Site Notice (the box in the top corner).

Now, to make that work, I amended the config table, which limits all the config items to 255 characters. I changed the Value column to “Text” (was Varchar(255)) and then in the admin page, added some random bumpf into the “Site Notice” page (at http://example.com/admin/sitenotice) and then found that same entry in the database (SELECT * FROM `config` WHERE `section` LIKE ‘site’ AND `setting` LIKE ‘notice’). I then amended what I’d written in there before to be the code I got from the “Get Button” page (both <script> and <a> tags from https://flattr.com/submit), and selected “Create Button Manually”.

I then refreshed by StatusNet front page, and tada! I’ve got a Flattr button. Now, if *only* I could get that as a plugin for my site.

Another e-mail to my MP #debill #AndrewGwynneMP

Dear Andrew [Gwynne MP],

I just noticed that, according to both this website:
http://debillitated.heroku.com/ and this one:
http://www.didmympshowupornot.com/ that you were not able to attend
the debate around the Digital Economy Bill.

Given that over 20,000 people are recorded as having written to their
MP, and over 23,000 twitter messages (since the 17th March) were sent
about the subject, and less than 4% of their MPs attended, I’m
slightly worried about whether this bill is being given appropriate
attention.

Will you reassure me that this bill is considered important enough to
your constituents (like me) that you will be asking the house to be
dropped until after the election, when it can receive the proper
scrutiny it deserves, or do you not feel that it’s important for your
constituents for you to be involved in the debate around a law which
permits the government to modify copyright without proper debate, and
which also enables “rights holders” to arrange the disconnection of a
whole household from participating on the Internet, where those
“rights holders” allege (and are never required to be proven in court)
file sharing has occurred.

Yours, in hope,

Jon Spriggs

Posted via email from Jon’s posterous

Use GMail’s SMTP gateway using the command line from !Ubuntu without lots of config #tips

I’m writing a few little scripts at the moment, and one of them needed to be able to send an e-mail. I’d not got around to sorting out what my SMTP gateway was from my ISP – but I do tend to use GMail’s SMTP gateway for non-essential stuff.

I thought I could easily setup sendmail, but no, that’s SCARY stuff, and then I thought of Postfix, but that needs an awful lot of configuration for an TLS based SMTP connection, so I did a bit of digging.

Thanks to this post over at the Ubuntu Forums, I worked out how to get a local port 10025 to run, but PHP kept complaining, so I next looked for a “sendmail replacement”, in comes nullmailer.

So, thankfully this is all rather easy.

  • sudo apt-get install openssl xinetd nullmailer
  • sudo tee /usr/bin/gmail-smtp <<EOF >/dev/null#!/bin/sh# Thanks to http://ubuntuforums.org/showthread.php?t=918335 for this install guide/usr/bin/openssl s_client -connect smtp.gmail.com:465 -quiet 2>/dev/nullEOFsudo chmod +x /usr/bin/gmail-smtp
  • sudo tee /etc/xinetd.d/gmail-smtp <<EOF >/dev/null# default: on# description: Gmail SMTP wrapper for clients without SSL support# Thanks to http://ubuntuforums.org/showthread.php?t=918335 for this install guideservice gmail-smtp{    disable         = no    bind            = localhost    port            = 10025    socket_type     = stream    protocol        = tcp    wait            = no    user            = root    server          = /usr/bin/gmail-smtp    type            = unlisted}EOFsudo /etc/init.d/xinetd reload
  • sudo tee /etc/nullmailer/remotes <<EOF >/dev/null127.0.0.1 smtp --port=10025 --user=your@user.tld --pass=Y0urC0mp3xGM@ilP@ssw0rdEOFsudo /etc/init.d/nullmailer reload

Setting all this lot up was pretty easy with these guides. There’s no reason why it wouldn’t work on any other version of Linux (provided you can install all these packages).

Good luck with your project!

[Politics] “Digital Economy Bill” = Internet Disconnection Bill

It’s very rare that I’ll inflict my political views on people by
e-mail, however, this has recently come up, and I wanted to make sure
that you understand what this newly proposed law could mean to you.
It’s only relevant to people in the UK, to ex-pats or Armed Forces
people, so if you want to forward it on – please do, but please think
before you forward, and don’t just blanket send it to everyone.

** If you don’t want to read all of the below, then I’d encourage you
instead to have a look at http://www.dontdisconnect.us/ **

In the Queen’s Speech [1] when parliament was opened for the 2009-10
session, the following was said:

“My Government will introduce a Bill to ensure the communications
infrastructure is fit for the digital age, supports future economic
growth, delivers competitive communications and enhances public
service broadcasting.”

The bill referred to is the “Digital Economy Bill”, which is due to be
introduced to Parliament this or next week, and it’s caused a lot of
fuss with us Technophiles.

Essentially, this bill allows “Rights Holders” (for example, Music
Labels, Film Studios and Television Networks) to contact your ISP and
insist that they issue you with a formal notice if they *believe* you
to be unlawfully sharing their content on the internet. After “a
certain threshold” the government has suggested [2] that it would be
acceptable to temporarily disconnect you from the Internet. A law
similar to this one was recently introduced in France, which insists
on disconnection after 3 warnings.

Now, again, this seems fair, if you can’t do the “time”, don’t do the
crime… but, how do they actually know it’s you? Because of certain
technical limitations of the Internet, everyone sharing a single
internet connection (for example in a house, at an office or a
internet café) will appear to come from the same internet address, and
this will cause you problems in this law, because:

* If you let someone use your computer to access the Internet, and
they unlawfully download some files, then the bill payer will be
blamed.
* If you have a Wi-Fi connection which is not properly secured [3],
and someone uses that connection to share a file they’ve downloaded,
again, the bill payer will be blamed.
* How about if your computer gets infected by malicious software
(spyware, becomes a member of a botnet, or worse still, is actively
hacked) and they use that as an untraceable machine to download their
content – again, the bill payer is blamed.

My other worry is that none of this goes in front of a court of law –
this all occurs between the ISP and Rights Holders, so if you get
disconnected, it will happen without any judicial oversight and the
prosecution’s burden of proof is never required… someone (usually
outside the UK) will accuse you of breaking the law and you will then
get disconnected from the Internet. To me, that hardly seems very
fair.

There’s a petition [4] against this law which is currently available
to be signed (provided you live within the UK, you are an ex-pat or
are a member of the Armed Forces), and, if you agree that it isn’t
fair, I would strongly encourage you to write to your MP [5]. If you
do decide to write to them, please review the content at the Don’t
Disconnect Us website [6] and review some of the letters which have
already been written [7] [8] as this e-mailing service will remove
duplicate e-mails so if you just copy the content it’ll never get to
your MP.

Thank you for your time. The links I have referred to above, labelled
[x] are listed below if you want to read them.

[1] Queen’s Speech: http://www.number10.gov.uk/Page21361
[2] Stephen Timms defends the Digital Economy Bill:
http://www.guardian.co.uk/media/2009/nov/20/digital-economy-bill-stephen-timms
[3] Ways to secure your WiFi connection:
http://www.dontdisconnect.us/secure-your-wireless/
[4] The petition against the Digital Economy Bill:
http://petitions.number10.gov.uk/dontdisconnectus/
[5] You can contact your MP via e-mail at this website:
http://www.writetothem.com/
[6] Don’t Disconnect Us official website: http://www.dontdisconnect.us/
[7] A letter I wrote to my MP:
http://jonspriggs.posterous.com/a-letter-to-my-mp-threestrikes
[8] A letter written by someone else to their MP about this law:
http://grahambinns.com/blog/2009/11/24/digital-economy-bollocks/

Posted via email from Jon’s posterous