The land of Shattered dreams

Welcome to the online revolution…

Facebook London Hackathon 2012

| Comments

Yesterday I went to Facebook’s London office for my first “Hackathon”.

We got started around 0930, and had a few hours of talks from the Facebook team as well as a number of their partners. The guys from Facebook talked to us about Open Graph, mobile development and Facebook games. The talks were a good introduction to Facebook’s various apis that we would be using for during the afternoon’s hacking. Three of Facebook’s partners then gave a very quick overview of their services.

We saw presentations from:

  • Twilio, who provide all sorts of telephony goodness
  • Deezer, a web based music platform
  • Pusher, a way of doing real time magic

Once we’d finished we moved on the hacking. Everybody split into teams and had 7 hours to build something using the technologies discussed in the morning. Various prizes were on offer for the best hacks, they just had to use the Facebook platform.

Ben and I were at a slight disadvantage in that there were only two of us in our team, and we wanted to build something that we could use a work. We had a few ideas over the previous couple of days and decided to build a store visit application. Basically, a customer goes to app’s Facebook page, chooses which store they visited and are asked to submit a review of the store. The review is posted to Open Graph and will appear on the customer’s Facebook timeline. When a customer visits the page of the store, they will see all the reviews for that store and be able to like, comment etc on them.

We also wanted to use Twilio to contact the customer if their review was negative to try to address whatever problem the customer had.

We’re kind of limited to our technology choice seeing as we do things in Java, so we built our app on Tomcat using Spring MVC. We got to the point of posting the customer’s review to Open Graph, but we didn’t really have anything in a fit state to present to the group.

Most of our problems were around our choice of technology. Spring is a great framework, but it can be a bit of a pain to configure properly. I tried to get hibernate working with hsqldb but failed miserably and spent 90 minutes trying to persist our reviews. In the end I gave up, installed mongodb and got it working in about 20 minutes. I used the localtunnel gem to allow Facebook access to my dev machine, but it kept on timing out which meant I had to continually reconfigure the app in Facebook. I used bootstrap for the colours and shapes, but it didn’t work properly in the Facebook canvas iframe.

Going forward, I’m going to look at Java Heroku which will remove the need for localtunnel. I need to play with bootstrap to get that to work properly and I will get the persistence layer working before I start when I go to my next hackathon.

All in all, it was a very useful day. I don’t get much chance to code anymore, let alone for 7 hours straight. The facilities provided by Facebook were excellent and all their engineers were very helpful.