Hackday

Well, Hackday was certainly an experience – the lightning strike and the roof vents opening was really quite disturbing! The lack of WiFi early on was a real pain as it made it very hard to connect projects, people and skills, so I suspect that most hacks were done by people who had arranged something beforehand, or who happened to meet at the bus stop.

Anyway, I got involved, along with Rob, Andy, Edward and James in something that turned into Fruitr – the search engine for unimaginative chefs. The basic idea was: take a picture of a piece of fruit, submit it to our site, and you’re rewarded with recipes that use that fruit. Rob and James worked on using a C++ image recognition library (not sure which one) from a Pylons Python app, which was driven by statistical matching against images from Flickr that are tagged with ‘fruitr’. Edward provided API access to his database of recipes courtesy of his site BigMunch, and I developed the testing web interface (later rolled into the main python app), and the email (in and out) interface. Andy had an abortive attempt at creating a J2ME app to talk to it, but was hampered by BlueTooth interference, buggy phones and poor mobile reception. We really had it all running by about midnight, and just a final polish was needed in the morning.

I spent much of Sunday looking at APIs to use with AMEE, without much luck or inspiration, then messed about creating an Apple Quartz Composer file that can be used as a screen saver. It grabs images tagged with ‘hackdaylondon’ from Flickr and presents them on faces of a bunch of rotating cubes. One face of the cubes displays live video (assuming you’re on a Mac Book? or similar which has a camera). There is also a spectrum-driven audio bar display, and a rotating Hack Day logo, which is also moved by sound. You can download the Quartz composer file.

I did the presentations for both hacks. For the Fruitr one I just ran out of time – sweaty fingers and trackpads really don’t mix. Because demoing a screen saver is not too hard, I dressed it up as a load of presentation faux-pas. I hope nobody thought it was for real!

Generally it was all pretty good fun, and it certainly had an excellent atmosphere, not to mention the endless supply of chocolate. Playing doubles tennis on the Wii at 2am was another highlight, along with the “non-showing” of Doctor Who…

I needed to leave before prizes and the Rumble Strips gig, so I missed out on that bit, and at the end of it all, I completely failed to grab a pink bean bag for Z. Oh well, I’ll be back next year!

GraphViz & SVG frustration

I thought I’d do a little warm-up hack for HackDay, so I wrote a little thing to interrogate the backnetwork API and build a network diagram of all the relations using GraphViz. It started out looking quite promising, but I soon discovered that lots of GraphViz features just don’t work very well (even simple stuff like putting labels in boxes), and also that common SVG implementations suck. Firefox’ SVG rendering is just awful – no anti-aliasing, lots of misdrawing, all text defaulting to 18px Courier bold and worse. WebKit’s nightlies are in a different league in terms of accuracy and rendering quality, but since scrolling is broken, large diagrams are kind of hard to display. GraphViz’s layout mechanisms are pretty cool (if rather unpredictable), but the errors it makes for labelling stuff just makes it unusable. Its output directly to PNG was worse than the SVG renderings.

This was my first attempt at using both GraphViz and SVG, and I have to say I’m massively underwhelmed. I hope that I’m using a bad version, or there’s some issue with my font configs as it really should be possible to get decent output from what I’ve gathered.

Update
Thanks to Bruno Pedro, I have something to compare against, and now something to point the finger at… It appears that the OSX version of GraphViz from fink is a waste of space, and simply doesn’t support some vital features. Secondly, it’s clear that Mac Firefox’ SVG rendering is totally broken, but the windows version works ok (in Parallels). Thanks Bruno!