Chunky | Goodness

Mix and Mash Nominations

I’m very flattered to have received 2 nominations for the ‘Best Mashup (so far)’ category for this years Mix and Mash contest.

The contest runs between August and September and challenges developers and artists to create innovative work using open New Zealand data and content.

As a prequel to the main event, there is a vote open for the best mash up so far, for projects created before the contest period.

Darfield quake timeline

This is a little mashup page I made after the September 4th earthquake in Christchurch. It uses the data from Geonet, the New Zealand geophysical information network, and the Timemap.js library to display the initial aftershock sequence from this earthquake as an interactive timeline.

The most interesting thing about this simple project for me is that I was contacted by Geonet and asked for permission to use the code on their own site, and it’s now present in the Canterbury quakes section of their site.

This is a great demonstration of the benefits of open data and open source in combination. Geonet provide open access to their quake data, allowing developers to create interesting and useful tools around that data. By making my code available as open source software, Geonet were free to incorporate it into their site. This kind of ‘round trip’ is what makes open data such a powerful concept.

Christchurch Metro

My second nomination is for my Christchurch Metro Android app, which uses real time data from the Metroinfo system to display arrival times, route maps and other information for the local bus service.

This was a ‘scratch an itch’ project for me, to provide a solid Android application for the Christchurch Metro, and also an opportunity to try out Android development. This project is also free and open source software.

The competition is decided by public vote, and any votes for either the Darfield Earthquake Timeline or the Christchurch Metro app would be greatly appreciated!

Find_or_create - Did You Find, or Create?

find_or_create_by_* is a great utility in the Rails toolbox. It allows you search for an object in the database by an arbitrary field, and if a matching object is not found, a new one is created.

# If a user with the given email address is present in the database, it is
# fetched and returned.  Otherwise, a new one is created and saved.
@user = User.find_or_create_by_email('user@example.com')

However, there does not appear to be a way to find out whether the object was found, or whether a new one was created.

An Everyday Commute Through Quake Town

To help give people outside of Christchurch an understanding of how widespread the effect of the Feb 22nd earthquake has been on Christchurch, I thought I’d take some photo’s of everything quake related that I see on my cycle commute from the eastern suburbs into town.

It’s now nearly 6 weeks on from the quake, but the images below will hopefully show how far we still have to go.