Projects

The visualization shows income inequality along London tube lines. My only rule
here was to use only d3 (no jquery!). I can confirm that DOM APIs are indeed
horrible, and that's without even trying to support IE.

For what it's worth I don't think the d3 API is very nice either, unless you
really like lots of chaining. I just don't find long chains of method calls
very readable.

When my brother got married in 2012, he wanted a photo booth so that guests
could take memorable pictures of themselves in a wide variety of silly outfits.
Being a young musician, he couldn't afford the real deal, so I was given the
task of hacking one together using an old netbook and his DSLR.

The hastily-written is code responsible for some very embarrassing pictures. It
works as follows:

A nodejs server script serves a single page with some client code.

The client code uses getUserMedia to display the webcam image on the screen,
as well as a helpful 'press a key to take a picture' message.

When a drunk guest presses a key, the client notifies the server over
websockets using socket.io.

The server then shells out to gphoto2, which takes 4 pictures using the
attached camera balanced just above the webcam.

Once the pictures are ready, the server thumbnails them and notifies the
client over websockets.

I lovedCoffeeScript when I first discovered it, back when the language
was picking up steam in 2011. I was just getting to grips with javascript, and
coming from python I found the indented, curly-brace free language far more
readable.

I was looking for some tools to generate documentation for a project, and came
across Docco. It could generate some nice-looking annotated source pages,
and was written by none other than the creator of CoffeeScript. But after
playing around with it I couldn't really see any benefit from generating
annotated source pages - why not just read the source? The comments are in
there.

I needed something that would show useful documentation for complex class
hierarchies spread across multiple files. After some messing about with the
CoffeeScript compiler, I had a working documentation tool.

It relies on a commenting convention based on python docstrings, so it might not
be an ideal fit for existing codebases, but if you're starting a new project and
you have a python background, you might like it. Have a look at the lovely
wintersmith.io docs to see what it can do.

Do you need a whole bunch of stock photos for your latest project? Or maybe some
images to flesh out a prototype? This command line tool fetches photos with a
Creative Commons licence using the flickr API.

Back when I was getting to know CoffeeScript, I loved it so much I wanted
to use it for everything, including frontend templates. I found CoffeeKup,
which seemed to offer everything I was looking for - not quite as nice looking
as Jade, but it meant I could write my whole project, front-to-back, in the
same language.

The only problem was, it was a bit slow. Frontend pages need to be fast, and
slow templates can make things unresponsive... ah who am I kidding, it was fast
enough, I just got caught up in some serious premature optimization. So much
fun!

The idea was to compile the templates to javascript, do some static analysis of
the resulting code with uglify-js, and move things around so that as much
as possible of the work that CoffeeKup was doing at run time was done at compile
time. The results were pretty good.