Nicolas Neu

dies & ditt.

Planethatch Hackathon

A couple weeks back I took part in the Planet Hatch Hackathon, hosted by @ianbishop. It was a rather small event with only 4 teams competing which I didn’t mind, seeing that it was the first event of this kind I attended. For those who don’t know how a Hackathon works: One person pitches an idea he wants to work on during the weekend. If you like the idea or you think you can contribute to this project with your skillset you join in. The projects at Planet Hack ranged from yup, that could actually be pretty useful to are you kidding me(looking at you, QR-Code based bathrom social network). I worked on an intelligent alarm clock for runners. It allows you to set two distinct alarms: The first one will go off if the weather is nice enough for a run outside. If its raining you may want to sleep a bit longer, so the second alarm kicks in.

photo by @Planethatch

Working in a new team where everyone has a different level of experience under a hard time constraints is quite different to what I am used to in my daily work as a grad student. Some things I took away from the event:

Try to get shit done: One of the guys in my team brought a RaspberryPi which was pretty awesome as I didn’t really have any opportunity to play around with one of those things so far. We had a couple cool ideas on how to incorporate the Pi into our project which, for numerous reasons, didn’t really work out. Instead of acknowledging that early on and concentrating on the actual product we continued to fiddle around with the Pi. We didn’t finish our project and some core functionality is still missing because we didn’t focus on the actual problem.

It always takes a lot more time than you think: This is probably true for every project you have ever worked on but it becomes even more apparent if you only have one or two days to finish your project. Just pull in the weather data, decide if you want to sound the alarm or not and then play an mp3 file. We can probably get that done during first evening (I think that was an actual quote). Well, we didn’t get it done the first evening, we weren’t even finished by the end of the event. There is always some component whose complexity you underestimate.

Be prepared: One of the problems we had with the Pi was a very unstable network connection (due to a 2-step auth wlan). That wouldn’t have been a problem if we had brought a switch and a couple of ethernet cables. This might seem archaic (heck, my laptop doesn’t even have an ethernet port) but it might just save your ass. Another thing I didn’t think about beforehand were the different development environments everyone was using. A couple of times I got something to work on my macbook only to find out that it doesn’t work on my neighbours Ubuntu machine. I am pretty sure it would have been smarter to set up a virtual machine and work from there. I’ve been wanting to try out Vagrant for quite some time now, that would’ve been the perfect occasion. Oh well, what can you do.

Think about how to wire stuff together: If you are all working on the same codebase things are fine I guess but if there are multiple components which have to work together somehow, you better have a rough idea how to wire everything together. Surprisingly that part went over much more smoothly than I expected, mostly due to the awesomeness that is REST. My code was mostly written in Python, setting up a REST endpoint required about 3 lines of code using Flask. To communicate with other parties the Requests library came in handy. To glue different applications together, this worked just wonderfully.

It’s a HACKathon: Half an hour before the demos we realized that the code to turn off the alarm via motion gesturing which was working fine on the dev machine couldn’t be run on the machine we were using for the demo. After some back and forth we decided to install the motion software which takes a picture everytime it detects movement in front of the webcam and just monitor the folder it saves the images to. If any new pictures have been added, the webcam picked up some movement. Ugly, I know, but it worked surprisingly well for the demo. Which is what counts in the end I guess.

By the way, the bathroom graffiti social sharing site won. So if you feel that your restroom quips are underappreciated, you should definitely check out plungr. Boy, do I hope that thing catches on.