(Second part of three; first part is here)
Software has bugs – there simply is no way to avoid them. If you can’t avoid them, maybe you can handle them efficiently? Yes, you can:
As you can see, the cost of fixing bugs rises as time passes. Why is that?
There are many reasons:
- When you find a bug a couple of minutes after you created it, you probably still have all the information in your head that is necessary to understand and fix it.
- If you just created the bug, no code depends on it. As soon as you start writing unit tests and more code, fixing becomes more expensive because you start to have dependencies.
- People might have gotten used to the bug and developed workarounds. If you fix the bug, this will have an impact on them.
- A bug found in production is likely to be reported by a customer. Customers can’t see inside of your software, so extra effort will have to be spent to determine what the actual problem is. Google for “how to report bugs“
- When a bug is discovered at the customer, it might trigger meetings and scapegoat hunting. Think of it this way: A 1 hour 8 person meeting costs about $1’000. And no bug was ever fixed in a meeting.
- Some bugs escalate to the top-level management. Imagine for a moment what it would mean for you if their CEO called your CEO to complain about a problem you caused.
- Bugs might break expensive things, harm or even kill people or start World War 3.
This also explains why unit testing is so much more efficient to QA testing for many kinds of bugs: It simply catches them before they spread their bad influence.
So fix your bugs early, OK?