If I could salvage only one piece of content from the old site, it would probably be The Programming Aphorisms of Strunk & White. It’s not the sexiest piece of content ever written, but it’s the only thing I’ve written that’s been featured on Coding Horror, which in those days was kind of a big deal for a guy in my line of work.
In The Programming Aphorisms of Strunk and White, James Devlin does a typically excellent job of examining something I’ve been noticing myself over the last five years:
The unexpected relationship between writing code and writing.
I would probably also include The Coin Flip: A Fundamentally Unfair Proposition? in that list because it picked up a few links from sites like Freakonomics and Cracked. Summoning the Harry Potter MMORPG because it had upwards of 5000 comments. A few technical pieces that have done well on Reddit or Hacker News.
All told, though, there are only 10 or 20 posts, out of a couple hundred, that I’d actually want to preserve—just enough to be too much work to do manually, but not really enough to justify spending a lot of time automating. Right in the sweet spot of pain in the assery, in other words.
Now let’s geek out for a second.
My source data—the green crystal—consists of an old SQL script which contains INSERT statements generated by a CMS I built a few years prior for the site as it existed 6 months or so before I took it down. I have no database, no schema, and no interest in spending a lot of time on this, but just to make it as cumbersome as possible, I’ve decided I want to preserve reader comments, which happen to be hierarchical, but not in any known standard format like Wordpress. So that’ll be fun.
My target data—the stuff I want to generate—consists of a set of Markdown files, one per post, that I can feed to Jekyll as part of the normal Jekyll publishing workflow. These files have some special requirements:
- The filename has to be in the format YYYY-MM-DD-post-title-here.md.
- Post metadata needs to be embedded in the file as YAML front matter.
- Post content needs to be in Markdown format.
I also need to handle tags, categories, static pages, Markdown conversions, and fixing the inevitable encoding errors that I know are lurking just around the corner. When all that’s done, I’ll have a set of Jekyll-compatible content, sans website or web design, that I can use as a basis—and the real work can begin.