Looking forward, looking back

In which I return to XOXO with keen anticipation, and PHP, with horror.

Jamie Talbot
XOXO 2015
3 min readSep 10, 2015

--

I attended XOXO in 2013, and really enjoyed it. Besides the talks themselves, I was secretly delighted to be amongst many people I’d admired for a long time, but never thought I would have a chance to talk to.

And then I didn’t talk to them.

Reading through some accounts from fellow attendees, I suspect I wasn’t alone. Fundamentally, I believe XOXO is about sharing in the joy of making things. I’m confident that everyone who attends is a basically decent person, and I suspect that maybe they won’t be upset — and may actually be glad — if someone was to say “Hi!”

Getting to attend XOXO is a privilege, and we should make the most of it. But working up the will to talk to strangers can still be tough. So in the spirit of the festival, I made a little thing: Attendee Bingo — a randomly generated card of 25 attendees from the Attendee Directory, which people like myself can use as an excuse to be brave and say hello to someone they haven’t met.

The attendee list is private, but if you’re going to the conference, there are details on how to get your own card in the XOXO Slack #commons channel. Search for bingo and you should find it, or send me a DM. (Or just send me a DM anyway and say “Hi!”)

I knocked this together in an hour or two. Most of the time was spent converting scraped attendee HTML data into a simple CSV format, trying and failing and eventually succeeding, mostly, at Vim regex-fu. “Two problems” is right. Such escaping!

:%s/@\(.\+\),\_s\+</@\1,,,</

And then I came to write the script to generate the card, and without thinking, I typed:

<?php

I was hosting the script on my personal site, which had PHP installed and serving already, so it made sense. Plus, I wrote PHP professionally for about seven or eight years before I joined Medium, starting on WordPress plugins, then an ISP management system, and then a whole chunk of code at StumbleUpon. During that time, I was acutely aware of the various language… quirks that abounded, but was still very effective and productive using it, and I was always ready to defend it.

In fact, as recently as two weeks ago I said to someone, “Sure, PHP is pretty arbitrary and inconsistent, but once you build a decent framework to abstract all that away, it’s fine.” Which is true-ish, but not a very ringing endorsement.

In the last two years, I’ve worked almost entirely with NodeJs, and more recently Go, which meant my PHP hammer was a little rusty, but still, fifteen minutes later, I was basically finished with my bingo script.

Not actual XOXO attendees.

I didn’t use a framework for such a simple thing, and that 10 minutes really shocked me. Here are six fragments:

$_SERVER['PHP_AUTH_USER'];
$attendees = array();
fgetcsv($handle, 1000, ",");
$attendee = new stdClass();
$keys = explode(",", $saved);
$saved = implode($keys, ",");

Huh. The functions implode and explode take their arguments in different orders. (Well, technically, implode can take its arguments in either order “for historical reasons.”) The syntax for array and object creation is totally different. Superglobals are a thing. A function called fgetcsv where the separator can be something other than a comma.

Compared to the clean, terse, expressive and ultra-consistent Go standard library, it’s a crazy hodgepodge of nonsense. I realise I’m somewhat late to the game in recognising this.

Perhaps I’m being a little unfair — it has been more than two years since I’ve written any PHP, so my knowledge is rooted in version 5, and version 7 just came out. There have probably been some syntactic improvements in the intervening time.

But still. It is an interesting thing to go back and look dispassionately at what you were willing to put up with on a daily basis. At the coping strategies, and the built up tolerance that allowed you to say “everything’s fine”, even as — in your heart of hearts — you knew it wasn’t.

This is not just true of programming languages.

See you at XOXO. I’ll be the one shouting “Bingo!”

--

--

Jamie Talbot
XOXO 2015

Ex-gaijin, kangaroo-loving software simian from Merrie England, leading folks at @Axios. Formerly @Mailchimp, @Medium, and @StumbleUpon.