I blog when I go abroad, and occasionally when I do stuff in the UK too. There's a nicer interface over here.

Friday, June 12, 2009

Doing shit offline

I was just thinking it was cool that I'm already the 3rd hit, at the time of writing, for "do shit offline" when searching on Google. But then I snapped out of it. Yes, my generation game post yesterday was about websites, but not all software engineering is about the web. The stuff I bang on about needn't spit out HTML or PHP or anything of the sort. I have an mp3-fixer-upper (mentioned below) which spits out a shell script. That's because these are just software engineering techniques (patterns, if you will) for generating lots of similarly structured output from minimal input: lots of unique data, but comparatively few templates.

I work as a software engineer whose career has mostly led him to working with websites; I do not work as a web developer. And despite currently being on the dole, I figured I might as well pimp some software that helps with doing shit offline, huh. These are 2 projects I've been intimately involved with as both developer and user.

r3

Yahoo!'s r3 is ostensibly an internationalisation/localisation tool, but to my mind its real power comes from the fairly complex, at first glance, inheritance path concept. This brings object-oriented techniques to file generation, and there's the key word: r3 is first and foremost a file generation tool. In go templates, out come files.

I was one of the core engineers on the team which developed and maintained r3's predecessors, which were internal CMS tools at Yahoo!. I had fairly heavy involvement in some of the architectural and design discussions and decisions made during r3's genesis, and was the sole internal customer representative at the team's first "next steps" planning etc session 18 months later. I'm quite a fan, even if the public docs aren't quite up to scratch.

pork.py

This is something I knocked up in Python in the last couple of months. I even blogged about it before. So much for "don't repeat yourself", huh? It's a simple script which marries YAML to a template, and creates some output. The output can be STDOUT or a file, and 4 template engines (of sorts) are supported. It's meant to be standalone, but deliberately usable as the central pivot of a get-some-data, produce-some-output, put-it-somewhere pipeline. In fact, when used this way you don't even need YAML - just a couple of python dictionaries. See my mp3-fixer-upper for an example of how.

No comments: