Sam Gentle.com

Embrace the suck

I was talking to a friend today about package managers and it reminded me of one of my favourite pieces of software: the Australian e-tax system. It integrates with about ten different awful government backend web services. It's built on some nightmarish HTML-meets-Visual-Basic-form-builder framework. It has, embedded in its hellish code dungeon, all of the various zillion arcane tax rules and things. In many ways, it is the grossest, most awful thing ever created. Yet I like it. Worse still, I respect it.

Paul Graham talks about schlep blindness, the tendency for startup founders to avoid complicated and unpleasant startup ideas, or even unconsciously filter them out before even thinking about them. I think there's a similar thing for code. There are certain kinds of software problems that are absolutely glorious to solve. Problems that, by the judicious application of the right algorithms and clever design, become completely solvable in a way that is elegant and satisfying.

Unfortunately, most problems that actually matter to people are only part elegance. The other part is all of the extra stuff that takes way longer than it should, that involves badly specified problems, arbitrary constraints and meaningless plumbing of data from one place to another. In a word: suck. The holy grail is to live in a world with no suck, but that world is very crowded. So what about going the other way? Embrace the suck and look for the least elegant, most complex, most unsatisfying class of problems. Maybe there's some seriously overlooked value there.

The example in question: I think we'd all be better off with a universal package manager that works everywhere, and can install things in any programming language. But there's no way to get something like that off the ground; people won't give up their existing package managers and trying to get everyone to agree on a new standard will never work.

But one thing that could work is going deep, deep into the valley of suck, and returning with a system that includes every other package manager's special formats and quirks in one horrific bundle. So it talks to npm for Node packages, talks to PyPI for Python packages, talks to the various apt servers, and knows how to manage each individual package format's expectations about how installing works, deals with conflicts between the packages... I mean, ugh, that is one profoundly sucky problem space. However, I don't think there's any other way to make progress there.

I can't find it now, but I remember seeing a really impressive exchange on the Chrome bug tracker. Someone was complaining about the way Chrome switches to another tab when you close an old one, and they said "this is just going to lead to more and more special cases". The developer replied "that's fine, we're trying to capture people's expectations and those involve a lot of special cases, so we'll just include them all".

What an idea! Just include every special case. My instincts were screaming about how awful that would be, how unbounded the suck. But they did it, and it works great. I don't know how Chrome chooses to switch tabs when I close them, but it matches my expectations, whatever those are.