Professional Blog

A few things I've been up to

Contributing to Open Source Can Be Easy

Although I’m busy day to day at my current contract *, that isn’t to say that my passions outside the office have come to a complete stop. I’m still going to regular meetups (like the PHP London Meetup and Docker London), and I’m also planning to go to Symfony Live London 2014. I’ve also been reading about, and trying some software, and making the odd fix and new code for myself.

I thought that it would be good to show some of the work I’ve been doing out of hours - some of it trivially easy - that I’ve done to help improve a few projects, and also some slightly larger things of my own.

(* Developing systems for Her Majesty’s Passport Office, in the Home Office)

Capistrano tagger - Quick fix to remove whitespace around sha1 hash

I regularly look around for new tools that can help me, even just a little, to make like just that bit easier. Capistrano (Capistrano on github) makes deploying code easy, repeatable and fast. Being able to tag the most recently deployed version is useful to be able to refer back. I’ve got projects that are using both version 2 & 3 of Capistrano (v3 is a complete rewrite of v2, so it’s not so easy to upgrade, but v2 still works just fine).

capistrano-deploy-tagger is an internal project, open-sourced by the Forward 3D. I’ve been to their offices several times for Devops and GoLang meet-ups, among others.

It’s easy to add this Capistrano plugin to help tag things when I deployed them - to know exactly when things happened. Trouble was, it didn’t work for me. I narrowed things down to the response from Git having a newline in front of it, so I added a ‘strip!’ to the appropriate variable, which removed the errant white-space. There’s probably a better way to do it, with some more behind-the-scenes git command, but this works for now, and solved my problem to boot.

I could have just left my fix in my local copy, and it would have worked quite nicely (at least till I went to upgrade the gem), but submitting a merge-request and having Ryan Conway pull it in, helps everybody - and now I get to automatically tag my deployments.

PHPDox - Correct source name in errors, PHPUnit, not PHPloc

I created my personal-ci meta-project to pull in various PHP-based testing and documentation tools with Composer. One of those was PHPDox, and it does a good job of processing the projects to make some good looking documentation.

While developing the personal-ci system, I’d been running PHPDox regularly with the rest, and getting some errors from not having all the files in place first (some of the additional logging output of PHPUnit). Trouble was, it was complaining about something that was there - some PHPLoc logs. So, I grepped the source for the message, and found two copies. One was in a class dealing with PHPUnit though - not the PHPLoc that was being reported - so the fix was just changing a couple of error message strings to show the right program.

A very simple change - a text-only bug, that confused (at least) me, and I could find an improvement.

FrequenceWebContactBundle - Improved English language translation

I was looking around for a contact-bundle for a project - a simple form to email system. Among my travels around Packagist & Github, I found FrequenceWebContactBundle.

This is another really trivial change - a couple of lines of improved translation. The original author of the project is French, I could fork and edit the file right in the browser (on Github) and make a pull-request in just a moment.

Rails3 multi-Oauth logins with OmniAuth

I couldn’t find a good tutorial on using the Ruby-on-rails gem ‘Omniauth’, with more than one authentication method, so that you could then login with any connected account into the same user. So I wrote one :).

I’m still looking for a good PHP-based equivalent though (using HWIOAuthBundle). In fact, until I had to depreciate the part of a new site that was going to use it, I offered a bounty to be able to get some good example code - with suitable documentation - written. That issue remains unanswered, and HWIOAuthBundle still doesn’t have a really good sample..


My newest open source code is faker-extensions. The actual code that is being run is really trivial - two classes and a total of three functions and then as many lines of actual code (plus some simple tests) - and two of those lines just call someone else’s methods, with a little local data. Its the local data that makes it interesting, and useful.

The classes (and tests I wrote for completeness) were actually pulled out of a private project - something I hope to be able to continue to do more of. Even though its so trivial, it is still a useful little library because I’ve also taken the opportunity to to try out a few new things with some public services.

Packagist badges are available from

Why I Like Djbdns & Tinydns

I’ve been using TinyDNS, and the associated systems, like DNScache and DaemonTools since 2003, when I was first tasked with setting up a local DNS resolver, and a DNS server for a web-development company I was working at We had dozens of domain names, and organising the changes - as well as paying per domain name, was getting to be, well, annoying, as well as potentially expensive.

So, I was asked to setup our own name servers….

A MySQL Optimisation Story

Here is an example of what a little expertise, judiciously applied can do to speed up larger systems. In this case, take a 30 minute run against a MySQL database down to 5 minutes, or less.

DNS and My Refreshed CV Site

It has been in process for a little while, starting when I moved the bulk of my DNS hosting from (with whom I’ve had a small virtual machine since April 2004). One of the things I really like about Bytemark was the free DNS hosting they provided, particularly since they used TinyDNS - which is worthy of its own post. To add a new domain name, create a small file with the relevant lines, with one per DNS record - really easy if you have any kind of database or automation.

New Professional Blog

Welcome. I’ve taken some time over the holidays to do a little re-organisation of my online presence, and I’d like to tell you what I did, and how.

First up, is this site. I’ve been considering what to put onto my Github pages for a while, and I think the most obvious thing are links to my recent work. As it is build on Octopress/Jekyll, it is also well supported by Github, and allows me to add static content pages into the site as well, so I’ve moved my online presentations here, from

My presentations

I’ve done a couple now, both on Queueing systems, and particularly on BeanstalkD, which is a very excellent system for such job-queues.

You should also check out my other post, which I also wrote today, DNS and my refreshed CV site

My other professional links