A sketched picture of James' head

James Smith

Building a better future out of code

What did you do in the election, Daddy?

Posted by

One wondeful thing about the 2010 General Election is that so many great projects have happened online; Francis Irving covers them in a post on the OKFN blog.

I was personally lucky enough to find the time to use these services to build something. I couldn't find election hustings in my area, so I decided to make a site to crowdsource and open up that information properly. Enter QuestionYourCandidates.

The site allows anyone to enter details of hustings in their area, basically, and link to them in a reliable way. It's made from:

  • Rails 2.3.5 - this reminded me how excellent Rails is for rapid development
  • Constituency & candidate data from YourNextMP through their API.
  • Postcode search via the TheyWorkForYou API.

Both these APIs were incredibly easy to use, and because they use canonical names for both constituencies and candidates, it was easy to then link the site across to other services like Democracy Club and The Straight Choice.

The main dilemma while coding I had was whether to have user accounts. I decided against it in the end, just protecting the edit pages with a captcha. User accounts would have just added another layer of complexity, for really no extra functionality or security.

The whole thing took around 6 hours from start to deploy, and I'm pretty proud of it. Unfortunately I did it a bit late to really be useful for this election, but I will try to generalise it to is can continue to be used for future elections. And, as always, it's open source. Code is on Github.

Comments

Add a comment