Using Persistent Storage with Gearman

I’m using gearman for the first time in a new project, and two things in particular were bothering me. Firstly, there doesn’t seem to be a built-in way to see what’s in the queue. Secondly, if the gearman server dies (which seemed quite likely when I was first getting to grips with this stuff and writing really buggy code!) you lose your queue. Therefore I decided that I would switch gearman over to running with persistent storage. Continue reading

Mercurial Primer

I am a source control nut, I’ve been speaking about Subversion for years, I co-lead an active open source project which uses git and GtiHub, and I’ve also dabbled with Bazaar. So far I’m feeling the limits of Subversion, loving the code-hosting features of some of the DVCS tools, and hating git and github in equal measure (don’t bother to try to talk me out of this, I’m well aware the problems are mostly on my side). I don’t know anyone else using Bazaar in the PHP community but I do know quite a few people raving about Mercurial, or Hg. This post is a quick introduction to the commands I have been using since I started trying out Hg and BitBucket for myself.

Continue reading

Ticket Giveaway: DC4D:2

Did you know that there’s a second edition of the DayCamp 4 Developers event coming up in March? The daycamps are a chance for developers to invest a day in their careers, wherever they are, focussing on the soft skills we need to grow beyond coding monkeys and into accomplished and upwardly-mobile professionals. It’s a virtual conference, so you can join us from anywhere in the world!

In the new edition of DC4D, I’m giving a session entitled “Could You Telecommute?”. I have worked from home for three years and if there’s one thing I’ve learned along the way, it’s that it isn’t always easy! Telecommuting doesn’t suit everyone so if you think you’d like to work this way one day, then I hope to give some pointers for how to tell if it will work out, or how to make it work for you. The event is on March 5th but there are also video-only tickets for those people who would rather watch their sessions back at their own pace.

I have a ticket to give away, so if you want to be my guest, leave me a comment and tell me why I should choose you! NB the tickets are only $35 so this isn’t quite as impressive as it might sound, sorry!

I’ll pick winners on 26th February, with a week to go to the event.

Book Review: The Passionate Programmer


I’ve been putting off writing this post, because I wasn’t sure I could do the book justice, but I read and really enjoyed “The Passionate Programmer” last summer, and I’ve been dipping into it again and again ever since. The book was actually a recommendation from Travis Swicegood, after he saw me give my talk Open Source Your Career. It seems like it’s not a well-known title so I thought I’d share my thoughts on the book and what I got from it.
Continue reading

Installing Gearman for PHP and Ubuntu

I’ve been using Gearman lately in a project that I’m working on, and of course a month later when I came to deploy the code, I had to look up all over again what was required for a gearman server in order to put it on the new platform. Here is the short version for my future reference (and yours, if you like)

Continue reading

Why I Love Unconferences

I’m seeing increasing numbers of unconferences popping up and I must say I’m quite enjoying them. Last year I went to OggCamp, we included an unconference at DPC, and now there’s a PHP-specific event coming up in Manchester: PHP Unconference Europe or phpuceu. I really like unconferences but I think sometimes people don’t know what to expect, so here’s an outline.

Continue reading

Using gnome-keybinding-properties

ubuntu netbook logoLast week I reinstalled my aspireone, which I’ve had for quite a while but which is really excellent for events. I put the latest Ubuntu Netbook Remix onto it and it installed like a dream, with peripherals and powersaving all working correctly. It says something about the positive experiences I’ve had with *buntu installs lately that I even did this over the wifi!

The weird thing was that I don’t really use Gnome on other machines as I prefer KDE, and I hadn’t seen the Unity desktop before (as I understand it, this is a lightweight gnome replacement – it still looks and smells like gnome to me), so there were a few things that were “missing” as far as I was concerned. Easily the most annoying is the Alt+F2 shortcut, I don’t really care what GUI I’m using, I mostly just run things from that! I also realised that I now had workspaces, but that there was no keyboard shortcut to switch between them (I don’t use a mouse, so it’s keyboard or nothing for me).

Enter a wonderful utility called gnome-keybinding-properties.
Continue reading

Using s3cmd To Manage Files on Amazon S3

Recently I moved some podcasts on to Amazon Simple Storage Service, or S3, which I know is great and easy to use, and I’ve used it with some wrappers, but never directly until now. It turns out, unsurprisingly, that S3 is great and easy to use :) I used s3cmd from s3tools – a collection of python scripts that made this really really easy. Even better, I’m an Ubuntu user so s3cmd is already packaged for me and I simply installed with:

sudo aptitude install s3cmd

Once installed, I found s3cmd --help was surprisingly helpful. To start with you need to set up an access key on AWS (Amazon Web Services) using your amazon user credentials, then supply this to s3cmd by using s3cmd --configure and following the prompts.

Continue reading

Quick-Start Guide for Google Charts API

Google Charts API is a nice, freely available tool for creating really good-looking graphs very painlessly. Don’t be fooled by the “API” bit though, there is no need for advanced understanding of HTTP here – you generate most graphs just by adding parameters to a URL! In this post we’ll take a look at a few different ways to generate charts.

One-Off Charts

If you just need a beautiful graph to put into a document or post, then the Chart Wizard is the best place to start. You simply choose the type of chart you want, input your data and choose the colours, labels, settings etc, and the wizard generates the URL for you to copy and paste!

The charts are highly configurable and can easily be changed by editing the URL to the image (view the source of this page to see the URL for the chart shown above). This makes it really easy to generate similar-but-different charts in your web applications, by using the wizard and then replacing some relevant parts of it.

Dynamic Charts

As mentioned above, it is very simple to generate charts with Google Charts API – and all the information for generating the chart is on a URL which returns a png file of the resulting chart. This makes it ideal for integrating into our dynamic web applications and charts that are generated are almost overwhelmingly configurable. That said, there are a few key options that will get you started quickly so let’s take a quick tour.

Continue reading