I think we are all well aware that bugs cost more money to fix the longer they live. What are the reasons for this? As some of you have heard me discuss in various presentations, a lot of it has to do with context. As developers move on to new areas of code, they loose context for previous areas that may contain bugs. Specifically, they loose the fine details on how that area of the code works, thus preventing a quick fix of the bug. I’ve done some analysis of some of the teams I’ve worked with and have found the time to fix a bug varies with time as shown in Figure 1.

Figure 1
This curve shows us that bugs caught early can be fixed fairly quickly. However, after a certain point, there is a spike in the amount of time it takes to understand to the code and fix the bug. I have seen this spike occur somewhere between one and three months, depending on the developer. Obviously this in and of itself is reason to fix bugs early. But there is another monster waiting for us in the closet…bugs love to procreate. (just like in nature) The longer a bug lives in code, the more chances developers have to write code to accommodate the bug, thus creating another bug or two or three. Left unchecked, this growth becomes exponential. (Figure 2) I’m guessing this is no surprise to many of you.

Figure 2
We can look at both Figure 1 and Figure 2 as “cost curves.” By this I mean that at points low on the curve we incur low cost and at points high on the curve we incur high costs.
In Agile, we seek to change the way teams test software. We want to eliminate the “let me finish it all, then you can test” mentality with “let’s write a little and test a little.” This behavior encourages teams to find bugs quickly, before they get into the wild. Lisa Crispin and Janet Gregory thing of this as “Coding and Testing Progressing Together” in their book Agile Testing. What is the point of cranking out a bunch of code if it’s riddled with bugs?
There are a ton of advantages to using Agile iterations. One of which is improved quality. By driving towards zero bugs every iteration, we can keep all of our costs on the bottom of the “costs curves.” This is one way that Agile helps limit the risk of ballooning costs late in a project.
63a8430b-0425-46aa-9bff-dd1c5b8236e9|0|.0