preface
I’ve been developing commercial software for about 20 years, mostly in Java, though I have experience with other languages as well. I have written hundreds of thousands of lines of code, and I’ve read even more code written by other programmers. If I’ve discovered one truism in my career, it is that humans are not perfect. Every programmer makes mistakes. Even the smartest software developers can introduce seemingly obvious bugs.
Mistakes always cause struggles. The program does not behave as expected; it fails with exceptions; users complain; and you spend hours reproducing, analyzing, and fixing the problem. Even a very small mistake, like a typo, may require a lot of effort to find.
Around 10 years ago, I discovered a Java static analyzer called FindBugs. It was a revelation to me. We had never used such a tool in our company before, and in a matter of a few minutes, it found dozens of real mistakes in the project I was working on at the time. It pointed exactly to the incorrect piece of code; I didn’t need to wait until the mistake actually affected users, and I didn’t need to investigate the problem. I could just fix it.