30 May 2009.

“What’s happening?”
“We’re cycling.”
“What are you protesting about?”
“Nothing. We’re just cycling. Grab your bike!”

Somewhere in London is a police control room, monitoring the thousands of CCTV camera littered across central London. I would love to be in that control room on the last Friday of every month, sometime around 7pm, as Critical Mass rolls up the slope from the BFI onto Waterloo roundabout.

I’d love to watch the hundreds of individual cyclists reduced to a single body behaving like a fluid gliding around town, gently affected by the varying viscosity of its surroundings, and deforming around obstructive nodes.

Critical Mass is important. Not because it’s a celebration of cycling, or any of the various groups that try and hijack it. Not because it’s a great way to see London or to meet interesting people. And not because it’s a metric ton of fun.

It’s important because it’s a wake up call to the rest of London that the city is here for you to use, so get out there and use it.

You're reading scraplab, a blog by Tom Taylor, who can also be found at tomtaylor.co.uk. Do get in touch, it would be nice to hear from you.

22 May 2009.

It took a few days longer than expected, but Clarke 0.2 fixes the Skyhook bug. Your installation should automatically update (or you can force it manually, or download direct).

When I launched, I didn’t realise that my developer account was limited to 350 users… until it started failing for everyone. Thankfully Kate and Ryan at Skyhook have been very helpful, and I’m set up with a proper account now.

I also added an option that Tom at Fire Eagle requested — to be able to pause location updates whilst your computer is idle.

There’s a little bit of housekeeping that needs doing before I can open the source code, but it’ll be Real Soon Now.

19 May 2009.

I’ve been doing some iPhone development recently, which I’m looking forward to talking about very soon. This has meant levelling up pretty quickly in Objective-C/Cocoa, which has been really quite enjoyable. I’ll come back to this another time.

Writing iPhone stuff means that you’re a short hop away from writing OS X stuff. And so, to prove I could, I made a small desktop application.

It’s called Clarke. It’s really not very exciting — don’t get your hopes up. It’s just a toolbar thing that sits there, quietly, using Skyhook’s API to triangulate your location from nearby wifi points, pushing it to Fire Eagle. Yes, it’s YAFEU (Yet Another Fire Eagle Updater).

Clarke

Anyway, it scratches a small itch of mine, allowed me to poke around with proper desktop coding a bit, and hopefully you’ll find it useful. Download Clarke.

18 Apr 2009.

As of 11:19:15 (GMT) today, James Bowthorpe was at 41.0928, 28.0028, otherwise known as the town of Fevzipaşa, Northern Turkey. He’s making great progress in his attempt to beat the bicycle circumnavigation world record, and raise some serious dosh for Parkinson’s Research in the process.

James got in touch before he left and we quickly developed a live dashboard, tracking progress and raising awareness of his 6 month journey. Where in the World is James?

SPOT were kind enough to sponsor his use of their Satellite Messenger unit, which has been faithfully reporting his location every 10 minutes during cycling hours for the last 20 days.

It’s an impressive piece of kit. Because it backhauls over satellite rather than cellular, it avoids poor reception and roaming charges, and somehow it manages to last two weeks on a pair of AA batteries. It’s quite affordable too, should you want to play with one for a protospime project.

If you have any smart ideas of things to do with the route history, there’s a complete export available in JSON format. Go wild, do something fun, but please let me know if you plan on hammering the server.

12 Apr 2009.

I’ve always considered natural laws not to be worth fighting. It’s just the way the world works, and it’s best to roll with it.

One of my favourites is the classic (albeit clichéd) ‘information wants to be free’, which stings people all the time. The most recent example that springs to mind, because I just finished reading the article, is the Labour smear campaign suggestion emails. Oops, and all that.

But, this is an easy one to deal with: be nice, and everything will be fine.

My other favourite is the second law of thermodynamics, which says that the universe tends towards disorder, or, it’s easier to break things than make them.

Considering these two laws together suggests to me that information follows a pattern of burst and decay. This is why your permalinks will never be permanent. This is why I have no qualms with wiping six years of my blog. This is why I don’t care if my URL shortener disappears.

I consider my activities online to be ephemeral, contributing to the machine for only as long as is necessary. I hope my children and their children’s children will be able to explore and experience this, but what’s most important is that they can experience all of this, and anything else is just ego.

13 Mar 2009.

Today is my last day at Headshift, and my last as an employee.

I’ve written this post a few times, trying to find a way of describing my time at Headshift that doesn’t sound clichéd or insincere. Put simply, I’ve had a wonderful time, working with some of the smartest, most passionate people I can name. I’ve learnt a lot, produced some projects I’m proud of, and made some wonderful friends. One can’t ask for much more really. I hope to remain part of the extended Headshift family, in both work and play.

I have no expectation of what happens next, but here’s a manifesto. Being interesting is as important as being useful. Making things that delight and inspire is as important as creating value. Old systems are crumbling; the best you can do is be nimble, smart and make some trouble.

We’re on the cusp of a few things that I want to be part of. The web-of-things, post-digital, and all that stuff. The geographic web and the mobile phone as a superpower. And maybe efforts avoid ending the 21st century as we started the 10th.

I’ve come to terms with the fact that I’m not particularly good at talking, writing or thinking out-loud about these issues. Certainly not as good as some of my friends. But I do seem to be able to make things, and that seems like a valuable skill.

So that’s what I’ll do, as a freelancer and as part of the Really Interesting Group.

But first, some downtime. On Wednesday I board a train and two days later I disembark a boat in Morocco. A well deserved road trip to Fez, the High Atlas, Marakech and back to Tangier. I’m looking forward to seeing that night sky again.

11 Mar 2009.

The Direct.gov innovation blog just released a data set of the “Pedal Cycle Accident Locations” for 2005-2007, broken down by year, in XLS.

I had early access to this at Rewired State and converted the Easting/Northings to Longitude/Latitudes through Multimap’s conversion API, and then from CSV into KML. Get the files for 2005, 2006 and 2007 and have a poke around.

It’s a really interesting data set, used wisely. There are around 16000 incidents a year (let’s not call them accidents — often one of the parties is to blame), reported to the police. The definition is:

Accident: Involves personal injury occurring on the public highway (including footways) in which at least one road vehicle or a vehicle in collision with a pedestrian is involved and which becomes known to the police within 30 days of its occurrence. The vehicle need not be moving, and accidents involving stationary vehicles and pedestrians or users are included. One accident may give rise to several casualties. “Damage-only” accidents are not included.

The locations seem to be relatively accurate (in London, at least), overlaying the road network close enough that you can pinpoint roads and even junctions.

I’d like to snap the points to the nearest road using OpenStreetMap, divide by road length and get an idea of the most dangerous roads and who is responsible for them. Alas, this probably involves me seriously levelling up in Postgres/PostGIS, which I haven’t found the time to do yet.

You could also use the data as a weighted input to a route mapper, helping to prioritise safer roads.

It’s important that it’s used positively. Cycling is safe, and more cycling makes it safer for everyone.

04 Mar 2009.

I’m a big fan of Sinatra, a lightweight Ruby web framework, perfect for deploying chunks of code that do one thing, and one thing well. It perfectly espouses the philosophy of small things, loosely joined, making it really easy to build applications and services that expose a just few resources, perhaps sucking in and spitting out JSON or XML.

I have a few applications running Sinatra in the wild at the moment, all deployed using Passenger, through Rack. Getting them live on my VPS involves a bit of Capistrano configuration, a bit of poking Apache configurations, and configuring a database where required. I’ve streamlined this process somewhat, mostly through judicious use of copy and paste, but it still feels a bit of excessive for what are usually 50 line applications.

So, I was pleasantly surprised when I stumbled across Heroku again the other day, the startup aiming to provide an “instant ruby platform”. I tried them a while back when they offered an in-browser text editor, but really didn’t get on with that. Thankfully, they seem to have separated this component off into Heroku Garden, leaving the core service focused on providing a platform for instant deployment, accessed through a git repository.

I had a quick play, and within five minutes I had S3 FM up and running, with very little pain involved. And here’s how I did it.

It goes without saying that you need a Heroku account, and to have followed their procedure for adding your public SSH key and creating an empty application.

Heroku uses Rack, so you’ll need a Rack configuration (config.ru) file in your root folder. Mine looks somewhat like this:

require 'rubygems'
require 'sinatra'
 
disable :run
set :environment, :production
set :raise_errors, true
set :views, File.dirname(__FILE__) + '/views'
set :public, File.dirname(__FILE__) + '/public'
set :app_file, __FILE__
 
log = File.new("log/sinatra.log", "a")
STDOUT.reopen(log)
STDERR.reopen(log)
 
require 'radio.rb' # contains my application
run Sinatra.application

I added the heroku remote repository to git, and pushed to it. When I tried to load the site it fell over. I ran heroku console and the classes seemed to respond, but heroku logs threw back a stack trace that revealed the problem — the server was missing Haml.

So, I made a vendor folder, unpacked the Haml gem into it, required it at the top of the config.ru, committed and pushed again. And it worked. Perfect.

I’m impressed. I can see myself using Heroku for deploying a number of lightweight apps, and even extracting some frequently used chunks of code and turning them into web services.

Much as Github has encouraged people to share code by removing the weight of starting a project, perhaps Heroku will lower the barrier to providing small web services by removing the scary nature of starting a site.

27 Feb 2009.

S3 FM is new thing I’ve built, from an idea by Russell, with a logo from Ben. That’s a multidisciplinary team, right there.

It’s a thing that lets anyone run a streaming radio station, with just a folder of MP3s. Put those MP3s in an Amazon S3 bucket, and give your friends the S3 FM link.

You could use it like a personal Muxtape, or to listen to Speechification, or maybe just to send you to sleep.

Under the hood, the site grabs the file listing from your Amazon S3 bucket, selects the MP3s, shuffles them into a random order and feeds them to the listener. Simple.

An important note – it’s your bucket, and Amazon will charge you for the bandwidth. But the good news is that it’s $0.150 per GB, which means that you could transfer about 1000 minutes of audio for 20p.

And that’s it. Have a go, and let me know if it breaks.

16 Feb 2009.

Sometimes, when the wind is warm and low, when the gear ratio is perfect and the tyres pumped, and when the road is soft and quiet, I feel weightless.