PHP and Gearman: Unable to connect after upgrade

I upgraded PHP and related pecl modules on my development machine today, and ran into a problem with Gearman. Actually I ran into more than one! Firstly the challenge of getting the newest pecl version working with a gearman version. Then an error where my existing PHP application couldn’t connect to gearman after upgrade.
Continue reading

Drawing Flow Diagrams with GraphViz

Recently I’ve been drawing a few different kinds of diagrams for a book I was writing, and been using graphviz to create them. Since I struggled a bit to get them going the way that I wanted them to, I am sharing them here (as much for my future self as anyone else visiting, but if they help you too then that’s excellent).
Continue reading

Comment, Don’t Tweet

This blog regularly features posts which are rather niche, incomplete or in some cases simply misleading (not intentionally, I promise!). Often I post something, and then discover there was an awful lot more to know, and find that people add all kinds of constructive suggestions, resources, and other goodness in the comments.

Continue reading

Adding Markers to a Google Chart

I seem to blog about graphs a lot at the moment, but that’s because I am seeing a lot of them, with one thing and another. I recently added some little bubbles to the line graphs produced by Bitestats (obligatory elevator pitch: one-page, simple summary report pull from your google analytics account). I think they are kind of cute:

Once I got going with them, they were actually pretty straightforward. You can actually add all kinds of markers to your google chart, complete with funky icons and customisable colours! The code I added to make these is simply:


&chem=y;s=bubble_text_small;d=bb,Max:+917,FFFFFF,660066;ds=0;dp=15|y;s=bubble_text_small;d=bbtr,Min:+185,FFFFFF,660066;ds=0;dp=20

All we have here is a simple specification of which kind of bubbles I want, the label for them and which data series (ds) and data point (dp) to attach it to. I generated the bubble tail directions sensitive to whether they were a min or max label, and which half of the graph they are in.
Continue reading

Speaking at OggCamp

I’m delighted to announce that I’ll be speaking at OggCamp this year. This is an event that I’ve attended both previous years, and one that I always seem to get a lot out of. It’s an open source, anything goes, unconference kind of event. Except that this year there is also a scheduled track of talks alongside the usual unconference content.

I love oggcamp for the sheer randomness of what I learn there. I’ve variously seen talks on home automation, mapping, operating systems, politics … the list is pretty long. This year, it’s in Surrey, on the same weekend as the final deadlines for my book so I figured I’d have to give it a miss. But when I got an invite to speak on the scheduled track, I realised this was the omen I needed, and accepted at once!

I’ll be giving a talk entitled “Open Source Your Career” – a talk which brings up an aspect of open source that we often don’t discuss; the personal rewards that an individual can gain from being involved in open source. If you thought it was all about altruism, think again. I’ll be bringing anecdotes, from my own career and others’, about how the best way to fast-track your professional growth. See you in Surrey :)

First Steps with GraphViz

This year I moved my whole presentations toolchain over to LaTeX and PDF, and where I added diagrams (which doesn’t happen a lot!) I used graphviz to generate them. Graphviz is a way of describing items and their relationships in a textual manner, and rendering them into a graph – and the results can be saved as an image, or included in LaTeX documents.

I found graphviz frustrating at times but on the whole it draws clean, symmetrical graphs far beyond anything else I can manage, even if I do use a mouse or tablet. Since I’m not able to use a pointing device on a regular basis, and I’m marking up my presentations in text also, it turned out to be a really good fit. I thought I’d share how I got on with it and some of my own graphs – as much to remind me next time conference season comes around as anything.

Continue reading

RepRap Masterclass

I spent last weekend in lovely Bath, but I didn’t get to see much of it as I spent all three days building a RepRap, or Replicating Rapid Prototype. This is a 3D printer that can print plastic into any shape you can think of (and some that I definitely didn’t). The Masterclass was organised by EMakerShop and brought together a bunch of people with ties to the local area who are all active in the project itself.

Continue reading

Using Modelines in Vim

I’m working on a book at the moment, and there are strict guidelines on formatting. One thing which is tripping me up is that all code samples must use two spaces for indentation. I normally have my editor set to 4 spaces, so I was looking for a good way to keep just these files consistent in their layout. Enter vim’s modelines feature!

You may have seen this, a comment line at the start or end of a document which gives the settings for vim to use, something like this:

/* vim: set sw=2: */

This is a modeline in vim. I tried adding my own at the top of my sourcefiles, but vim seemed to ignore them. It turns out that modelines are disabled in vim by default (for security reasons) but you can easily turn them on in your .vimrc with:

:set modeline

The only change I want to make is the tab sizes which is why I use the line above. The vim modeline documentation is the best place to go if you want to add options of your own to this line

The Worst Way To Find Women Speakers

I am a female speaker, and a software developer, which puts me in a fairly small minority at the events I usually attend (I’m a PHP consultant based in the UK, to give you an idea of what kind of events those are). Recently I’ve been asked my opinion more than once on the issue of women speakers being in a minority at technical events, and I’ve also been the “token” women speaker at a technical event.

The worst thing you can do is find some random, underqualified person who represents the demographic you want to include, and put them on the stage. Although gender is often the issue we hear most about, the same applies to anyone who isn’t a young, white male; it’s just that gender is easier to see and talk about than either age, ethnicity, sexual orientation, or anything else, and also since I’m a young, white female, it’s the only aspect I can comment on.Women are in such a minority that they are, almost by definition, representative (see http://xkcd.com/385). Anyone who sees your randomly-selected woman speak will simply go away thinking that women aren’t really good at speaking. Continue reading

Apache on Ubuntu/Debian

Apache on Debian. Ubuntu

When I first started using Ubuntu, I was coming from a distro journey that started with FreeBSD and took in Mandrake and Gentoo along the way; I hadn’t worked with any Debian-based systems before and was new to the way that Apache is configured on those platforms.

Continue reading