Code Inspection: why, when and what
When should you inspect software?
We advise you to inspect code during development AND before testing:
Inspect during development—Software maintenance starts from day one of a project and inspected software is less expensive to alter, fix and maintain. This statement is founded upon these research findings:
- The average project experiences about a 25 percent change in requirements during development,
- 70 to 85 percent of rework on a typical project is caused by changes in requirements during development,
- Raytheon reduced its cost of rework from about 40% of total project cost to 20% through an initiative that focused on inspections.
Inspect before testing—Software should be inspected before it is tested: when it comes to finding defects, inspection is much cheaper and faster. This statement is founded upon these research findings:
- Software defect removal is the most expensive and time-consuming form of work for software,
- NASA's Software Engineering Laboratory found that code inspection detected about 3.3 defects per hour of effort, compared to 1.8 errors per hour of testing effort,
- The average cost of finding an error using code inspections is 3.5 staff hours compared to 15-25 hours to find each error through testing.