Calculating the Economics of Software Inspections

that 1000 lines of code can be inspected in 53 hours by a four-person team. So to reach the cost of two hours per defect, you need to be finding more than 25 defects per 1000 lines of code, since the two hours includes the rework cost. If you think 25 defects is too high, cut it in half and rerun the calculations. Inspections still provide a positive ROI, in this case only 2:1 rather than 3:1. If you plan three-person teams, lower the cost appropriately.

One other point-in these examples the inspection cost savings accrue only for "major defects," the term used to indicate the defect would cause the product to malfunction in either test or use. Spelling, grammatical, and code comment defects (called minor defects) are not included in the calculations. We are trying for an apples-to-apples comparison. I have actually seen some inspection analysis charts where major and minor defects have been lumped together. I'm not sure why anyone would do this (unless they were trying to make one of the defect removal numbers look better-a clear case of metrics malfunction).

Summary
I've tried to present a fairly straightforward way to calculate ROI scenarios for inspections, using a "what-if" spreadsheet template referenced above and located at this Web site. Keep in mind these examples are meant to show you how do to the ROI calculations, and that the data used, while reasonable, needs to be substituted with your own data or estimates. This method includes some simplifying assumptions, and you may be challenged because one or more items were left out. When that happens to me, I ask, "What is the overall impact of your item?" Just add the numbers of your objector in, and see what the impact is. Usually, the impact on the ROI is negligible. You may run into problems with the defect density numbers. All I can say is that numbers in the 20-25 defects-per-1000-lines-of-source-code range are not at all unusual when an organization starts doing inspections. If you were not seeing this defect rate, I'd begin to wonder how many defects are being fixed "under the table."

Calculations

Design Inspections

35 pages
7 pages per hour recommended preparation rate
5 hours per inspector
5 inspectors = 25 hours preparation
7 pages per hour recommended inspection rate
5 hours, 5 inspectors = 25 hours
Total time = 50 hours

Code Inspections

1000 source Lines
150 Lines per hour recommended preparation rate = 6.66 hours
4 inspectors = 26.66 hrs
150 lines per hour recommended inspection rate = 6.66 hours
4 inspectors = 26.66 hours
Total = 53.33 hours (50 for ease of calculation)

Note: Requirements inspections usually take longeer

References:

File: 

About the author

Ed Weller's picture
Ed Weller

Ed Weller is an SEI certified High Maturity Appraiser for CMMI® appraisals, with nearly forty years of experience in hardware and software engineering. Ed is the principal of Integrated Productivity Solutions, a consulting firm that is focused on providing solutions to companies seeking to improve their development productivity. Ed is a regular columnist on StickyMinds.com and can be contacted at edwardfwelleriii@msn.com.