Effectiveness of Code Review – Some figures
There is a silver bullet that can drastically improve the rate you develop code while also reducing delivered bugs.
Though this bit of magic can reduce debugging time by an easy factor of 10 or more, despite the fact that it’s a technique well known since 1976, and even though neither tools nor expensive new resources are needed, few embedded folks use it.
Formal code inspections are probably the most important tool you can use to get your code out faster with fewer bugs. The inspection plays on the well-known fact that “two heads are better than one”. The goal is to identify and remove bugs before testing the code.
Those that are aware of the method often reject it because of the assumed “hassle factor”. Usually few developers are aware of the benefits that have been so carefully quantified over time. Let’s look at some of the data.
  • The very best of inspection practices yield stunning results. For example, IBM manages to remove 82% of all defects before testing even starts!
  • One study showed that, as a rule of thumb, each defect identified during inspection saves around 9 hours of time downstream.
  • AT&T found inspections led to 14% increase in productivity and tenfold increase in quality.
  • HP found 80% of the errors detected during inspections were unlikely to be caught by testing.
  • HP, Shell Research, Bell Northern, and AT&T all found code reviews / inspections 20 to 30 times more efficient than testing in detecting errors.
  • IBM found that code reviews / inspections gave a 23% increase in productivity and a 38% reduction in bugs detected after unit test.
So, though the inspection may cost you 20% extra time during coding, debug times can shrink by an order of magnitude or more. The reduced number of bugs in the final product means you’ll spend less time in the mind-numbing weariness of maintenance as well.
image credit: compete.com