PHPLondon08 follow-up

I think it was Juliette that was asking me about spam filtering in PHP. I didn’t think that was such a great idea (spamassassin is slow enough!), however, it seems that some others do.

The framework shootout session was very interesting. It was nice to see Toby jumping into CodeIgniter with such ease – it contrasted markedly with my own difficult initiation into CakePHP! There was mention of Kohana which I’d only seen a couple of weeks previously, but looks pretty good – I had always been put off CI by its support for PHP4, so a PHP5-clean version is very appealing. This article spells out the differences.

The shootout was, um, augmented by a heckler who had decided that all frameworks were “criminal” because they didn’t conform to the letter of the “rules of MVC” (though MVC is really a pretty loose term AFAIAC). He wouldn’t name his mystery preferred framework, but I later found out it was Agavi when I saw it demo’d by its creator. It is indeed very nice, and has distant ancestry in Mojavi (as used by Symfony). One of the things that I was impressed by is that it uses (of all things) HTML for marking up templates. This is an elegant reversal of what I’ve seen before, where form elements are typically generated by helpers (requiring syntax that you don’t know). Why mark up a form input like this (vaguely CakePHP style):

<?php echo $htmlhelper->textinput(‘name’, ‘name’, 20, 50); ?>

when you could do:

<input type=”text” id=”name” name=”name” size=”20″ maxsize=”50″ />

and still get automatic server and client-side validation and ajaxy feedback goodness, but also have it play nicely with HTML editors like Dreamweaver? It also makes for a great deal of sense when generating non-HTML output. I can’t think why other frameworks have not done this before.

Agavi also has very elegant routing so that a single controller function is available across all access methods, whether HTML, JSON, SOAP, XML-RPC or whatever. Makes CakePHP look very dumb.

Anyway, so maybe this heckler had a point of sorts.

I have to say a big thank you for the compliments I’ve received about my talk. Maybe it wasn’t so bad after all! I’ll get on with doing the remaining audio ASAP…

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!