Libertarian Programming

If you haven’t already read it, Steve Yegge wrote a post providing an axis of alignment for programmers. The basic idea is that programmers tend to fall on spectrum between liberal and conservative based on the aversion to risk.

For the most part I get it and can agree to an extent. My one beef is that the perspective on risk seems rather one sided. The question of whether something will break for users is only part of the story. The boring nature of “conservative” developers might appear to be solely in fear for the user’s well being, but in my experience, the aversion of risk actually involves everyone involved with the code.

People, while having some pretty strong differences, still have survival instincts. If you are getting burned, your natural instincts kick in and you move extremely quickly. In other scientific fields, we’ve been burned plenty of times and as such, our industries reflect good instincts. Companies have had to shut their doors due to mistakes and carelessness, which in turn “burned” the entire industry in such a way as to cause an instinctual reaction.

Why is it in programming we haven’t seen a similar trend? Sure, we’ve seen source control and the Joel Test become relatively standard, but past that, what have we learned as an industry that is clearly the best practice for everyone involved in coding?

I have a theory why we have been somewhat slow developing our survival instinct.

If you follow sites like Slashdot, Hacker News and Reddit, you’ll see articles come up every once in a while that deal with age and programming. A quick search for “programming age” quickly returns some examples questioning if age is a limiting factor for a programmer. Generally, programming is considered to be something for the young, even if we don’t say so out right.

The result of this subtle ageism is that we often think new concepts can only come from young minds who have yet to be jaded by the old ways of thinking. The liberal programmers who don’t acquiesce to the conservative curmudgeon down the hall are the ones who will truly revolutionize the industry. As a culture, the new technology is what is most important, with the youth having the loudest voice.

Steve suggests that the longer you are a programmer and experience the pains of failure, you become more risk averse, hence becoming more conservative. I’d argue that the real risk you are adverse to involves spreading incomprehensible code and wasting the time of those that will come after you.

The developers I respect most have a knack for taking old code that makes no sense and turning it into clear and concise code with tests, tooling and documentation. Even though they are not making huge strides in new user functionality or creating new models for dealing with big data, they are exponentially saving the precious time of every other developer that works on the code. The potentially boring decisions and technology they used manages to hide complexity so effectively, it never seems to rear its head again.

If I were to put a political category on this line of thinking, I’d say it was Libertarian. New technology is great, as long as it doesn’t effect the liberty of other developers. Every new feature and bug fix should be tested for validity as well as reviewed in light of whether it adversely effects the ability of other developers to work on the code.

If I were describe myself, I’m a libertarian programmer. My desire is to write code that helps the users while staying out of the way of others I work with. I don’t always do a great job of this, but I’ll claim the naivete of youth and mention that I’m listening to my elders in order to overcome my lack of understanding.

Passionate programmers are going to disagree. It can be helpful to put terms on the different perspectives because, as Steve says, it provides an easy way to agree to disagree. At the same token, our industry makes a lot of mistakes and assumes that our flexibility and disagreements are simply clashes of opinion. The fact is our metric is often too focused on the result without considering the means. The time we save our users can be exponentially increased by saving our developers time.

The next time you find it difficult to read some code or set of tests it might be worthwhile to consider what impact your code has on others. The freedom you feel when writing new code is because you have not been encumbered by the code of others. There is no reason that when you are working on code others have written, the same freedom is not possible. As a libertarian coder, my goal is to write code that protects liberty of my fellow programmer.