On Quality, Discipline and Focus

On Quality, Discipline and Focus

Software Quality is not only about writing bug-free applications but also about avoiding them in the first place. Avoiding bugs in the first place is not only about writing unit tests so we don’t break things as we build, but also about discipline and focus. Discipline is not about having to write unit tests before we do anything (so I can be reckless on everything else) but also about being methodical (not methodological). Unit tests are no substitute for old fashioned discipline. Focus is not only about details but about being aware of what is important.

Discipline and focus is what got Comalatech, my company, started. The first two years, I went without any unit or automated tests. Then I realized I was spending too much time testing, so I stopped everything for months and retrofitted unit and integration tests. It was a painful experience but it was worth it.

The first few hundred clients, I managed to develop and support the products all by myself. But, even with the unit tests, I used to spend six to eight hours testing manually on every release. Of course that model was not scalable and I had to grow the company to move faster.

The team grew, and proper and more extensive unit testing became part of our discipline.

But discipline is easy. Focus is not. Particularly for us, perfectionist programmers. We just can’t stand seeing anything wrong or broken, it has to be fixed. And we are very clear on what is wrong and what is right; no matter what, it has to be fixed.

Perfectionism is a curse among programmers.

Why? Because in software, it’s so easy to be perfect. Because, as much as we complain about complexity, software is such a controlled environment.

But then there is the real world.

Consider the real world and be humbled. Let’s not even examine human interaction, medicine, or social sciences, but a simpler discipline, such as woodworking.

It’s amazing how many factors drive the outcome in woodworking: the tools (type, material, sharpness), the environment (humidity, temperature, dust), the supplies (grade, material, dimension). What about the actual wood? There is strength, grain, flexibility, humidity, density.

Can you control all those factors as you do in software? No you can’t; you manage them. Add to all that the complexity of the project you want to build, and chasing perfection becomes even more difficult. And then there is your own ability to work the wood. Use the wrong nail or hit it too hard and you’ll split the wood plank. Measure only once and you’ll very likely cut it too short. Be reckless and you’ll lose a finger.

How long does it take to master woodworking? Way longer than mastering programming. But wait, aren’t we coders the geniuses, the artisans? We hide in our bubble-world called software and obsess about perfection. The real world exposes the flaws in our perfectionism.

Perfectionism distracts us from focusing on what is important. What is important does not always makes sense, particularly among perfectionists.

Perfectionists focus far too much on what is wrong. If you focus too much on what is wrong, you miss what is important: delivering value. If you focus too much on what is wrong, you become a negative influence. Negativity does not build good software.

Focusing on value requires a tolerance to imperfections. Being successful in software requires a lot of tolerance for imperfections, for that matter.

Perfectionism without discipline can lead to disaster. If we obsess on perfecting the details we miss the big picture and fail to deliver value.

Quality is the result of discipline and focus. By focusing on what you are trying to solve, and by being disciplined on how it is constructed, you build the right solution. Discipline helps you to remember the factors you should focus on, which are usually those you cannot control