Many years ago I wrote the book No Bugs! It is from a very different world from the one we work in today. Java & C# have eliminated entire classes of bugs discussed in the book. Unit tests have proven themselves to be a very powerful tool. And the debugging tools we have today – wow.
But with all that said, the first two chapters here are, I think, every bit as useful and powerful as they were when first written.
The core concept to understand is the following (excerpted from the book):
A developer I know once said, “Bugs should not be called bugs, they should be called Massive “F”-Ups [MFUs].”
“Bug” connotes that some outside agency decided to infest your program with bugs and that if you live a clean life, and sacrifice small furry animals at the foot of your computer, they will go away.
MFUs exist because programs are written by people, and people make mistakes.The only way to eliminate MFUs is to go into your code, find the bugs, and fix them.
This is the most critical concept to understand (and the one most often blown off). You will write MFUs. You will sit down and with complete malice of forethought put MFUs in your code. Think about it – you know that you are the one putting the bugs in there. So if you sit down to code, you will be inserting some bugs.
And somebody needs to find them so you can remove them. No amount of designing, prototyping, CASE, reviewing, management, and so on, will avoid this.
This concept is important because it colors your approach to debugging your code. If you view mistakes as “bugs,” you hope none are found. (You hope the good fairy came by, sprinkled pixie dust, and the bugs left.) If you view the mistakes as MFUs, you know they unquestionably exist, and you hope to find all of them so that they can be fixed.
After 20 years I think the above remains the key to minimizing bugs (you’ll never eliminate them) – they’re MFUs and you put them there. Having the correct mindset is the most powerful tool to shipping solid code.
The book is free and the first two chapters are still spot-on. Download it, read it, pass it on.
Author: David Thielen
Dave, Windward's founder and CEO, is passionate about building superb software teams from scratch and dramatically improving the productivity of existing software teams. He's really proud that he once created a game so compelling (Enemy Nations) that a now-professional World of Warcraft player lost his job for playing it incessantly on company time. You can read more from Dave on his personal blog, and at Huffington Post.
Other posts by David Thielen