The 3 Virtues of Good Programmers
Just don’t take them literally
Long ago, Perl creator Larry Wall named three tongue-in-cheek virtues of programmers: laziness, impatience, and hubris.
Before you go trying to learn the latest programming languages and trendy frameworks to improve your craft, take a look at these three “virtues” and try to incorporate them in your daily work.
Just don’t take them literally!
Virtue #1: Laziness
It’s telling that computer science is the only field where “lazy” is a technical term.
Programmers have a lot of work to get done. Logically, the best way to address a large set of work tasks is to get rid of any of them that you don’t really need to do.
Next, try to get rid of any repetitive tasks. If there’s one thing we hate, it’s routine. We don’t want to repeat the same keystrokes if it’s possible to write a script to do it for us.
Why? Because we’re lazy — and that’s a good thing. Laziness is a result of our desire for efficiency.
In some cases, this can be a bit of a cultural miscommunication. Sometimes programmers are judged for how much code we produce. For managers from non-technical backgrounds, a programmer who works really hard to produce an enormous amount of code might be seen as the hardest worker in the office.
But a clever programmer knows that producing a lot of code might just mean you’re being inefficient. It’s much better to come up with a clever, low-effort solution, rather than reinventing the wheel or over-engineering something. Why spend hours writing code you don’t need?
Virtue #2: Impatience
Impatience doesn’t help when you’re stuck in traffic, but it can be useful in programming.
It’s the reason we build faster compilers, browsers, and operating systems. We want everything to load quickly, to be efficient, and for interfaces to be responsive. A good programmer cannot tolerate slow systems — our impatience does not allow it!
Nothing is more satisfying for a programmer than making a significant performance improvement. I once increased the throughput of a data pipeline by a factor of ten and I still bring it up in interviews as my finest moment in that role.
There’s just something about saving time that sets programmers’ hearts aflutter!
Virtue #3: Hubris
Have you ever been frustrated trying to figure out how to do something in a programming language and thought to yourself, “I could write a better language than this”? That’s the exact thought process that has given birth to every programming language.
The idea of throwing away an entire programming language and writing a new one from scratch is the creative hubris that inspires programmers to create new solutions.
It’s also the idea that we could not only fix a widely used piece of open-source software, but actually write a replacement that works better. Without that impulse, we would be stuck working with old proprietary languages and frameworks forever. The open-source community is fueled by virtuous hubris.
Hopefully, you now have a better understanding of what Larry Wall’s virtues mean.
These virtues are actually different aspects of the desire to work effectively. Being effective often means knowing what the right thing to work on is, rather than just accepting an inefficient or flawed way of working.
I wouldn’t recommend incorporating laziness, impatience, or hubris into every aspect of your daily life — like cleaning the house or doing the dishes — but it works well as a motivator for writing better programs!