I recently participated in FreedomHack, a 24 hour hackathon organized by inMobi. The event was organized in memory of Aaron Swartz, with ‘Freedom in Software’ was an integral theme. I, and my teammates (Harshit and Karan) decided to create an application to calculate and attempt to reduce the carbon footprint during travel. To do this, we decided to leverage the datasets provided by the Indian Government, and use them in conjunction with Google Maps, to find alternative paths of travel, which will have lower carbon footprint. An environment centric idea, but still had ideas for expansion. Overall, the hackathon experience was awesome, and the fact that we achieved most of what we had in mind with half an hour to spare felt nice. Following were some of my experiences:
- I had written some PHP code, to retrieve tickets from my GMail account using IMAP, and parse basic information such as Source, Destination etc. My code was flawed in the beginning, and Karan really had to rewrite most of it, and make it efficient. As for testing, my credentials were hardcoded into the file. For jest, Karan and Harshit added some comments in the code to mock me, and uploaded the pic to FB. Somebody used the credentials and changed my password (facepalm moment!!!). This was one of the craziest experience in the event
- We had divided responsibilities among ourselves, and my main task was to create an API exposing the functionalities provided by Google Maps. A Key aspect was how the data parsed from GMail would be passed to my functions. We zeroed in using AJAX to retrieve the data exposed as JSON. We made a small mistake of sending JSON as a string, rather than modifying the HTTP headers and sending response as JSON. This wasted some time. Moral: Always know inbuilt language features, rather than attempting to write your own
- We used Git from the beginning, but due to some faulty commits, gave up after some time. This is not the ‘right’ way to collaborate, and next time, we have to do better in this regard
- Bootstrap really makes for good UI, and we used it to good effect in our application
- Technical aspects aside, me and Karan didn’t sleep for the duration of the hackathon. Surprisingly, our productivity picked up after 00:30, and most of the code worked after that.
- The organization of the event was awesome, and it was a nice hacking environment. Tea/Coffee/Juice/Munchies helped us stay awake and code. Really had a nice experience, though one thing bugged me. Talks during the hacking hours just doesn’t make sense.
Staying true to the ‘Software Freedom’ philosophy, I will be pushing the code on Github (minus my GMail credentials). Overall, the hackathon produced some excellent hacks. More hackathons to follow…