Productivity tools for higher quality code

Photo by Maurits VermeuleThe perceived benefits of basic development tools like version control and test frameworks are usually around productivity. But a less obvious and very important benefit is that they enable developers to write higher quality code.

For example, the obvious benefit of version control is that it allows you to recover old versions of code which is useful for hunting down regression bugs, or to fix a previous version of the code without losing your current work on the next version. Similarly a test framework means fewer bugs and more reliable, predictable delivery. All of these scenarios are essentially about productivity; they don’t deal with the quality of the code itself.

However, they do also enable higher quality code, and I saw this very plainly a little while back. I was introduced to a codebase that had grown over about 20 years without any version control. It had any number of hacks, kludges and commented-out lines, which my guide was very open about. And it was clear (as he admitted) that these things had been put in there and left in there because successive developers didn’t fully understand what was going on. They were afraid to touch them. To remove those nasties would have required quite a bit of bravery, and without version control that “bravery” would really have been recklessness. Any attempt at improving the codebase would have had to have been guaranteed to work because it would have been impossible to unwind it. If they’d had version control those developers would be risking very little in any attempts at improving the codebase.

Similarly if they’d have had the chance to build a suite of automated tests.

Tools which which improve productivity by reducing risk in development actually provide a means to improving the quality of the software itself.