The Guns of Boston

This short story came out of the retro-future / 1930s Popular Mechanics vibe of VNV Nation’s album “Automatic”. If you fancy something appropriate to listen to while reading, here’s a YouTube link to one of the songs from the album: VNV Nation — Photon

I parked up on the northern shore of Long Island, just in time to catch the dawn.  As the sun took its first tentative step into the sky, slivers of orange light flashed from horizon to horizon, lighting up the gleaming chrome of Boston’s railgun spires.  The air hummed the song of stored electricity, punctuated by the pop-pop drum-beat as each one launched its precious Europe-bound cargo and the slow mechanical clanking of each one adjusting itself to changes in the wind high in the stratosphere.

The people of Europe would be at lunch already, eagerly awaiting the day’s American cargo so that business could carry on.  Boston always started early.  Then, as dusk gathered in Glasgow, La Rochelle and Lisbon, the postal guns of western Europe would clank and pop and hum into life, speeding their packages back towards Boston’s early afternoon.

The best times for the guns always seemed to be dawn and dusk, as if the whole network and the rotation of the Earth conspired to show off the blazing silver of each heavenward-pointing barrel.

I suppose it was pride, even narcissism, that brought me back to that place every morning.  It was a thrill every time to see the pencil and paper of my designs translated into three dimensions, for while that paper had captured the power consumption, the launch velocities, the wind compensation; it could never have captured the beauty of the spires catching the dawn, and it could never have captured the elation of knowing that the future had become the present.

A sigh, and a half-hearted glance at my watch. The Central Post Office, itself a marble and glass cathedral to technology, awaited me. They told me that it had been a year already since the first railgun postal service began. Had I really sat and watched the dawn three hundred and sixty-five times? Spring had become Summer, Fall and Winter, and here we were again on another April day. I supposed that it must have been a year, though it seemed like a week and like a lifetime.

I felt as if I was one of the guns, then.  So busy every day, yet standing tall as a monument to future generations; part of the fabric of the world, set apart from time.

A foot gingerly pressed onto the gas pedal lifted my car from where it had parked, and I swung it slowly around to face the city before putting my foot down more firmly.  In a shower of dirt, then sand, then water, we shot out across the bay, toward the glass and chrome city that blazed in the morning light.

HOWTO: Convert WordPress Posts to Pages

I’ve recently had the unfavourable job of converting some 400 posts on my WordPress-powered site into pages. I’d been putting this off for a while, as as far as I could see the only sane way of doing this was using p2pConverter — a great plugin for converting individual posts to pages and back, but sadly with no bulk conversion capability.

I had a number of post categories, and I wanted all the posts in each category to become pages underneath a certain pre-existing page. The advantage with this scheme is that if the old category and the new parent page have the same name, the URL of the page doesn’t change during conversion. (e.g. a post “SuccessWhale” in category “Software” has the URL /software/successwhale, and so does a page “SuccessWhale” underneath a parent page “Software”.)

In the end, I wrangled some SQL to do the job. This is how I did it.

This HOWTO is in the public domain. You are free to re-post it wherever and however you like, though a link back here would be appreciated.

Before anything else, back up your database! I am not responsible if you break your site by following these instructions.

After backing up, I fired up MySQL Query Browser and pointed at my database. You could use that, or phpMyAdmin if your host provides it, or even a command-line interface on the MySQL server if you so desire.

Back in the web browser, head to the Dashboard. We need to get two numbers — the ID number of the category you’re moving posts from, and the ID number of the parent page you want the new pages to sit under. For the first, pull down the Posts menu and click Categories. On the right-hand side, hover over the “Edit” link under a category name.

Category Mouseover


On your status bar, you should see the location that link is pointing to. At the end there should be a number, such as the ’14′ in this example.

Category Statusbar


To get the second number, click the Pages menu on the sidebar. Just as before, hover over the Edit link of the page you want to be a parent.

Page Mouseover


And again, the status bar text will end with a number, which you need to note down. Here, it’s ’890′.

Page Statusbar


Now back to the MySQL Query Browser. Before jumping in with a move straight away, we should check what we’re about to move just to make sure we’ve got it right. Execute the following query, replacing 14 with the first number you obtained earlier:

SELECT *
FROM wp_posts, wp_term_relationships
WHERE (wp_posts.id = wp_term_relationships.object_id)
AND (wp_term_relationships.term_taxonomy_id = 14)
AND (wp_posts.post_type = "post");

This should produce a list of the posts you want to move, and only those posts. If it does, great! Edit the following query, replacing 14 with your first number from earlier, and 890 with the second number:

UPDATE wp_posts, wp_term_relationships
SET wp_posts.post_type = "page",
wp_posts.post_parent = 890
WHERE (wp_posts.id = wp_term_relationships.object_id)
AND (wp_term_relationships.term_taxonomy_id = 14)
AND (wp_posts.post_type = "post")

Execute that, and you should be done! Check the Posts and Pages sections of the Dashboard to make sure it’s worked as you expected.

In my experience, the first query will sometimes not return exactly what it should. In this case, I’m afraid I don’t have a clever solution — this problem occurred with less than half a dozen posts for me, so I just converted them with p2pConverter.

If you have more categories of posts to convert, repeat this procedure again until you’ve got them all done.

I hope you’ve found this useful!

Overpackaged Much?

The Envelope: Vast, Thin, and Oily.

The Envelope: Vast, Thin, and Oily.


The phone company Orange appear to be giving out free headphone adapters as part of some promotion or other. So, naturally, on the bandwagon I jumped to see if I could grab some that would work with my phone. I filled in the form, clicked Submit, and thought nothing of it for the next two weeks.

Then I get a failed delivery note through the door. I’m expecting a few of these for various people’s presents, most of which I’ve ordered off the internet. But it’s a letter, apparently, and Special Delivery – so it needs signing for. “Strange,” think I, “I’m not sure I ordered anything flat enough to be considered a letter.” So down to the sorting office I go, and pick up… this. A something-bigger-than-A3-sized plastic ‘envelope’, that feels like it contains a piece of paper. Weird.

Package Contents

Package Contents

So I attempt to unpack said piece of paper. First thing of note, the envelope-thing is oily. Not visibly so, but I had to stop in the ASDA bathrooms just to wash whatever gunk it was off my hands. And, once finally inside, I discover… two pieces of paper! Once of which is the delivery note. The other, a full A4 sheet of 6-point text. “Terms and Conditions”.

What the heck?

Just in case, I rummage some more, and at the very bottom of the bag, I find a small black object, maybe a centimetre long at most. And, once I’d found some light to see it properly by – my god, it’s a headphone adapter! I very nearly threw the bag away without finding the damn thing.

The Adapter Itself, Just in Case you Missed It

The Adapter Itself, Just in Case you Missed It

And, just to complete the aura of bizarrity surrounding the whole thing, it of course is not even the right plug to fit my phone.

So, er, anyone want a 2.5mm to 3.5mm jack adapter? Be warned, I may send it to you in a full-length shipping container.