18 April 2012, early morning
My coworkers and I participated in the HackTO 2012 over the weekend. It’s a single day hackathon. A bunch of developers met at the new Freshbooks office and were given 6 or so hours to build something using the APIs of several companies who were sponsoring the event. The day began with presentations of the APIs and what sorts of things a programmer could do with them and then everyone got down to hacking. There was a prize for the top 3 applications and prizes for the best use of each API.
Ian Ha, who was part of the winning team, has a great summary of how he approached the competition. Before they stepped foot in the Freshbooks office his team had already researched the APIs, decided on what they would build, and tried to split up what work would need to be done. If you want to win a hackathon all of his advice is spot on.
Sadly, my coworkers and I did none of these things. There were 4 of us in total: Sam, Houssam, Max, and myself. I arrived in the morning vaguely aware of what all the API available were about, but not really sure how any of them worked. Houssam wanted to build a shared-listening version of Soundcloud, while the rest of us didn’t really have any ideas we were too happy with. We were disorganized, but motivated.
After the API presentation we sat down and started to think about what we wanted to build. We ended up settling on an 80s Joke Line: you could call it to hear a joke, let us know if you liked it or not, and then share your own. There would be a website that presents the top 10 jokes. We would use the APIs of Twilio and Soundcloud. It all seemed quite manageable.
Houssam felt there wasn’t enough Node.js in our project and decided to give his own idea a try. Sam helped us figure out if this was all doable or not and then had to run off to meet a friend. Max got to work trying to get telephone service working using Twilio. I built the initial skeleton of the web application, which I checked in to our repo at 11:20AM. After lunch Max and I programmed together, with him doing the bulk of the coding. Every so often I’d work on something in parallel to help with what he was doing or fix bugs. At the 11th hour Houssam got stuck on his project and rejoined ours, which is the reason the 80s Joke Line doesn’t look ugly and has a frontend that works. We might have only had a telephone service if Houssam didn’t help us out at the last minute. It was all a bit frantic.
What we finished was a step back from what we had planned. We didn’t have time to let people rate the jokes. (This simplified the website as well since we could just display a random joke.) With an event like this it’s a good idea to pick a project like this, where you can stop short and still haven’t something to show for your efforts.
I’ve seen people sharing their code from the competition. We have gone a step further and shared the actual repo we used during the competition. Most of the commits are straight up broken. Lots of the commit messages are “Ooops”. I think it’s interesting and educational to look at how something goes from a bunch of junky code that does nothing to a bunch of junky code that does something. It’s easy to get embarrassed about stuff like this.
When we demoed the application it was running of a development server (so if two people called at the same time things wouldn’t work). We did a lot of heavy work inside the request-response cycle of the web application. This meant that when you told us your joke you’d have to sit on the line waiting for us to download what you said from Twilio and then wait some more while we uploaded it to Soundcloud. (This has all been fixed now.) None of this really mattered because Max was funny and engaging during the presentation of our application.
We ended up winning an award from Soundcloud for using their API. I suspect they liked our name and awesome logo.