What I’ve been up to on my sabbatical

One of the perks of working at Automattic is the offer of a 2-3 month sabbatical after five years service. Most people take the opportunity to travel, to disconnect, or to achieve an ambition. I triggered mine pretty much on the fifth anniversary of my joining the company; and I've spent the first half of it doing... web development.

I’ve always been interested in politics and elections: even as a kid, I’d stay up late to watch the live coverage of by-election results. So as it became obvious that a general election was looming in the UK, more or less at the time I’d become eligible for my sabbatical, I saw an opportunity to get involved in the digital efforts of my favoured political party, the Liberal Democrats.

I had hoped to find a party machine into which I could slot for a month or two; but that wasn’t really how it worked out. Instead, I got in touch with leading Lib Dem digitalist Mark Pack, with whom I’d worked in the past, to seek his support for a few ‘independent’ experiments.

I started with a data gathering exercise: pulling together a master spreadsheet of all available data of even the slightest relevance to the election. Reference numbers, previous election results, Brexit referendum vote (estimates), swing required, historic declaration times, etc etc. All open public data, of course, but scattered across the web, and far from accessible to the average activist.

I turned it into a multi-tabbed Excel spreadsheet, with easy (auto-) filtering and sorting. It forced me to extend my Excel skills; I’m now quite the expert in INDEX MATCH lookups.

The manifesto was published, and I saw an opportunity to build a Q&A content site. More than half of Google searches don’t result in an onward click these days: people get what they need from the results page, often from an answer box at the top of the page. Plus, voice-based devices like Alexa use the same markup for their answers. So what if we created content targeted directly at the questions people ask about party policy, in suitably marked-up form? Yoast’s FAQ block makes it easy.

It wasn’t particularly impactful: really, you’d need more time than we had available to build the necessary Google kudos. But it was an interesting exercise in itself, and asks some interesting questions of what a manifesto should be these days. The official rendering wasn’t bad, but it certainly wasn’t built with online consumption and search engine indexing in mind.

Meanwhile, it was becoming obvious that local parties were crying out for more visual collateral to enhance their social feeds. There was a nice, flexible design style for the election campaign: but producing graphics meant asking someone at HQ to fire up Photoshop. Just not scalable.

So I waded into the world of PHP-based graphic manipulation, and cobbled together a rough-but-ready image generator. Users could upload (or quote the URL of) an image; crop it according to social-ready dimensions; apply a number of lines of text on top, in the right font, the right colours, and at the correct angle (wow, that part was hard); overlay a logo, if desired; then download it, ready to use.

Effectively, hard-coding the style guide, and simulating Photoshop layering, in an HTML form. Anyone could create a styleguide-compliant graphic in seconds.

A number of the more digitally active constituency parties have used it, and told me it’s been really useful. But again, I hope the more important outcome is proving that this sort of thing can be done, relatively quickly and easily; and should be part of the plan for next time. Styleguides shouldn’t be supplied as documents: they should be hard-coded into tools, built for use by non-experts, and distributed widely among the grassroots.

Finally, I applied my new-found knowledge of image generation to the idea of ‘pledge cards’ on social media. I built a single-page web app using data from Democracy Club’s crowdsourced candidate database, to let people find their local Lib Dem-endorsed candidate, and share their vote with their social media following.

Sounds easy enough, right? – but you have to factor in the constituencies where the Lib Dems had stood aside to support a Green or Plaid Cymru unity candidate, under the (excellent) Unite To Remain initiative; or independents like Anna Soubry, Dominic Grieve and Gavin Shuker. Northern Ireland, where the Lib Dems don’t stand, but have a sister party in Alliance. The tradition of not opposing the Speaker. And one or two unfortunate instances where official support was withdrawn after a candidate’s nomination.

So I built a solution which turned a postcode into a constituency, found the candidate, no matter which party they came from… then allowed the user to write a short testimonial of why they were backing them (with a few manifesto-derived suggestions offered). The output was a constructed tweet or Facebook post, with all the right hashtags, on the user’s clipboard, ready to be pasted.

For maximum impact in people’s social feeds, I included a link back to the form, including the constituency’s reference code; which allowed me to (dynamically) add the necessary page metadata for large visual links in Twitter and Facebook, including one of 640-odd pre-generated pledge graphics.

(I should say a special word of thanks here to my long-time colleague Scott Evans, who jumped in to help with some of the technical and creative stuff that was simply beyond me. It was nice, like having CFTP back together.)

It could all have been smarter. We could have embedded the testimonials beautifully inside the images. We could have done some data capture on why exactly people were voting for a given candidate in a given area. We could have pushed the tweets/posts directly into the social networks. I had no shortage of ideas; just a shortage of time and, to be frank, talent.

I’ve seen quite a lot of people sharing these graphics – and as Mark blogged, the personal touch has the potential to influence a lot of people. We’ll review the initiative’s results in the light of the electoral results.

It’s been a lot of fun, getting my hands dirty with code again. To be blunt, my current role at work doesn’t give me much opportunity to exercise my own creativity. And to do so, on something which I care about so personally, has been even better. I’ve learned a few things, and gained a lot of experience which I can put to good use, in various ways.

And so the first half of my sabbatical draws to a close. Family will come first over the Christmas period; then I have a bit of time in January to do something memorable. Returning to work is going to be… challenging.