Alex Stockwell

UX, DevOps, Fatherhood, Miscellany. Not in that order.

Ship the Small Stuff

I shipped a thing.

It’s a small thing, but I think it’s pretty cool: serfix. It’s a line filter program that corrects the character counts in PHP serialized string objects, within a MySQL dump file, after having done a mass find/replace. And it’s written in Go.

I originally wrote it in Python, Perl and Go for benchmarking’s sake, and a colleague also translated it into Ruby. But from a dependency standpoint (and ideally, performance too, but it’s not there yet), something that’s (cross-)compiled would be ideal. So Go it was.

The project was fun and I learned a lot. What more could you ask for? Some of the rationale:

  • It solves a major pain-point of our wordpress deployment workflow.
  • It follows the unix axiom of “do one thing, do it well”.
  • I wanted to pull together all my Go forays into something proper and production-worthy.
  • I wanted to write a compiled line filter program. You know, for kicks.
  • I want to learn to write a proper lexer (no regex). Alas, this is still on the roadmap.

It works like a champ, but the source is still a duplicative disaster in need of refactoring. No judgements!

Check it out.