Measure Time to Detect Defects

When I was young I read a study by TRW done in the '60s that measured the cost of fixing a defect that was detected at different points in the development cycle. If the developer who wrote the defect found it immediately after writing it then we can assign one unit of effort for resolving that defect. If that's true, then it takes something like seven units of effort to resolve the defect during the testing phase, 15 units of effort to resolve the defect just before release, and a whopping 67 units of effort to resolve the defect if it makes it into the hands of the customer. In other words, the cost of fixing defects grows exponentially with the amount of time it took from when the defect was created to when the defect was resolved.

It's always cheaper to fix defects sooner. This is because the longer we wait from when a defect was created, the less we are familiar with it. The vast majority of time and effort in debugging isn't involved in fixing the defect. Some defects do require a significant amount of reengineering but most defects are small problems that can be quickly and easily fixed. What can't be done quickly and easily often is finding the defect in the first place. Much of the time, finding a defect is where we spend most of our effort and once we locate the defect it's usually trivial to fix.