Against Tedium

As a web dev, I often feel like a ridiculous percentage of my day is spent converting between FooBar and foo_bar in the Ruby server code, foo-bar in the CSS class, fooBar in the JavaScript, and Foo Bar in the documentation. There’s so damn much repetitive plumbing.

I have the same feeling of wasting my time as I did shortly before Django and Rails were released, when I was working in PHP. I realized I was copying code around that did the same things for ORM, routing, organizing templates, etc. and starting to extract libraries to do it when *poof* some folks who were a year ahead of me released the thing I’d been working towards. Getting to use their work was like a cheat code that skipped me ahead a year of work.

When I look at the new wave of frontend toolkits (Ember, React, etc.) I don’t have that same shock of recognition, I think “ah, yeah, I see how that’s an improvement, let me get me pipe wrench and threader�. The job is back to lots of schlepping data into and out of strings, hashes, and ad-hoc data structures and serializations. There’s a new sea of drudgery waiting to be parted.

Old tedium: mapping table column names to model attribute names, fixed with ORM. New tedium: mapping attribute names to HTML element classes, JSON fields, JavaScript model attribute names, form field names, etc. The old problem is still solved, but as our app scope has broadened we see the same problem in new clothes.

Not to say there aren’t other bits of new tedium that are much more novel like repeating validations on client and server; to say nothing of the constantly low reliability and maintainable of most code.

There’s a cycle where we realize we’re doing repetitive work and build new abstractions into new tools (or, far better but far more rarely, find ways to eliminate repetitions and abstraction) like Rails promoting ORMs.

Programming is always as hard as possible. When we recognize that a task has become predictable, boring, repeatable, it’s time to build new abstractions until we’re writing novel code again.

And for the first time in a long time, I see a cheat code, a big jump available on the horizon. I use this blog for notes and half-baked ideas and rants, so it’s on a new blog called Valent:

Skyscrapers and Doghouses