TrainingConferencesAbout UsContact UsAdvertiseSQE.comRSS Feed

StickyMinds.com: brain food for building better software

Log In
 Clarify Your Search Criteria

Tips on Using Our Search Feature(s)
 
StickyMinds.com Home
ResourcesTopicsCommunityPowerPassBlogs
Home  >  Detail: Do Your Inspections Work?


Viewing Item 1 of 480


A StickyMinds.com Original
Article Picture
Do Your Inspections Work?

By Karl Wiegers

Send This Content to a FriendGet a Short Link to This ContentPrint This ContentSee User Comments About This Content

Summary: Software inspections are meant to uncover defects and save considerable project effort and cost. But how do you know if your inspections are cost-effective compared to testing and other quality activities? Can you even tell if inspections pay for themselves? In this week’s column, Karl Wiegers outlines three ways to measure your inspection efforts.


MKS
Inspections are a great way to find defects in software work products, but how well do your inspections work? Do they actually reveal defects? Are they cost-effective, compared to testing or other quality approaches? Do they pay for themselves? The only way to answer such questions is to collect and analyze some data from your inspections.

Assessing Inspection Impact
Three measures of inspection impact are effectiveness (the percentage of the defects present in a work product that your inspections discover), efficiency (the average effort required to find a defect), and return on investment (the time your organization saves from inspections compared to their cost).

Calculating effectiveness requires that you count the defects found by inspection, those discovered in later development or testing stages, and those that customers report. If you know your inspection effectiveness, you can estimate how many defects remain in a deliverable following inspection.

Efficient inspections discover many defects per hour of effort. There’s a paradox here, though. A successful inspection program leads to process improvements that reduce the number of mistakes that developers make. So, as your product quality improves, the cost of discovering each defect will increase. You need to judge whether decreasing inspection efficiency metrics truly indicate higher product quality or if they mean that your inspections are not working as well as they should.

Return on investment is the net savings from your inspections divided by the detection cost. The net savings are the costs that your team avoided by finding defects early, rather than late. If you know the average cost of finding and fixing a defect during system test or in operation, you can estimate the potential savings from each defect found by inspection. Detection cost includes the effort spent on each inspection plus the overhead costs of your organization’s inspection program.

Inspection Metrics
The basic dimensions of software measurement are size, time, effort, and quality. The following data items will help you assess your inspection effectiveness, efficiency, and ROI.

Size.Planned lines of code or document pages that you planned to inspect
Size.Actual lines of code or document pages that were actually inspected
Time.Meeting duration of the inspection meeting
Effort.Planning total labor hours spent on planning, scheduling meetings, assembling the inspection package, and the like
Effort.Overview total labor hours spent on the overview stage
Effort.Preparation total labor hours spent on individual preparation
Effort.Meeting total labor hours spent in the inspection meeting
Effort.Rework total labor hours spent correcting and verifying defects
Defects.Found.Major number of major defects found
Defects.Found.Minor number of minor defects found
Defects.Corrected.Major number of major defects corrected during rework
Defects.Corrected.Minor number of minor defects corrected during rework
Number.of.Inspectors number of people who participated in the inspection meeting

You can calculate several useful metrics from these data items; some are listed below. To jump-start your inspection data storage and metric calculations, use the simple spreadsheet available from http://www.processimpact.com/pr_goodies.shtml.

Defect.Density number of defects found per unit of material inspected
Effort.Inspection total labor hours expended on the inspection
Effort.per.Defect average total labor hours expended to find a defect
Effort.per.Unit.Size average labor hours expended to inspect a document page or a thousand lines of code
Rate.Inspection average quantity of material inspected per meeting hour
Rate.Preparation average quantity of material covered per labor hour of preparation
Rework.per.Defect average number of labor hours needed to correct and verify a defect

Data Analysis
As a general metrics guideline, if you don’t plan to analyze the data, don’t waste time collecting it. You can analyze data accumulated from multiple inspections in several ways:

  • Track averages, such as the number of lines of code inspected per hour (an inspection that goes much faster than average probably missed some defects).
  • Correlate pairs of metrics, such as defect density and preparation time (slower preparation generally finds more defects).
  • Use statistical process control to monitor key parameters, such as defect density (an unusually low defect density could indicate that inspectors missed some defects).

Inspection data can also indicate whether you are catching defects in the same lifecycle phase in which they were created. Because the cost of dealing with defects in subsequent stages increases rapidly, your goal should be 100 percent defect containment, with none leaking into downstream work products.

Some Measurement Caveats
The prime directive of software measurement is that a manager must neither reward nor punish individuals for their metrics results. The first time a practitioner is punished for some data he reported is the last time the manager will get accurate data. Aggregate the data from multiple inspections to monitor averages and trends in your inspection process without compromising the privacy of individual authors.

Beware of measurement dysfunction, which arises when the measurement process leads to counterproductive behaviors. Forms of inspection measurement dysfunction include defect severity inflation or deflation, and distorted defect densities, preparation times, and defect discovery rates. Inspectors who are rated on how many defects they find will report many defects, even if it means debating whether every small issue truly is a defect. Authors whose performance evaluation depends on how many defects inspectors find in their products will avoid inspections, fudge the data, or spend excessive time perfecting a product before inspecting it.

Your Bottom Line
I don’t know how many defects your inspectors will find. However, many organizations have saved considerable effort through software inspections, which provides an excellent counter-argument to resisters who fear that inspections will slow the project down. The ROI only has to be a little higher than 1.0 to make inspections worth doing.



About the Author
Karl Wiegers is Principal Consultant with Process Impact in Portland, Oregon. Karl is the author of Software Requirements, Creating a Software Engineering Culture, and the recently published Peer Reviews in Software: A Practical Guide (Addison-Wesley, 2002). You can reach Karl at http://www.processimpact.com.

Reference: This column installment is adapted from Peer Reviews in Software.

Back to Top
 

StickyMinds.com Weekly Column From 6/24/02 

Member Comments
Add Your CommentExpand Comments
 
Comment:    
by Rick Briggs 6/28/2002

Good article! Reviews and Inspections are included in the Information Systems Examination Board's Foundation Course in Software Testing, which I teach. This course however makes a clear distinction between Reviews and Inspections and your article (and the responses to your article) seems to use the two terms almost interchangeably. Surely, Inspections per se are quite a different animal to Reviews. With Inspections the key to success lies more heavily on the inspectors themselves knowing exactly what is expected of them and doing their job properly, which is the key to whether inspections are going to be effective or not. The gathering of...Read On

Author's Response:
7/1/2002    
Rick -- Actually, I did not use the word "review" anywhere in my article, only "inspection"! There is great inconsistency of use of terms such as review, inspection, and walkthrough, both in the literature and in practice. I use the term "peer review" or simply "review" to describe any manual activity in which someone other than the author of a work product examines that product with the express intent of finding defects and improvement opportunities. In my book, I describe a spectrum of review formality, with 7 different types of review approaches. "Inspection" is a specific type of formal peer review (there are several types of inspections, actually) that involves a team of trained people following a well-defined process to discover defects. I use the term "review" whenever the specific type of peer review being performed isn't important to the point I'm discussing, and I use the term "inspection" when specifically talking about that type of formal peer review.

 
 
Comment:    
by Robert E. Lee 6/25/2002

Those are good metrics, Karl but they omit a whole category of benefit: cross-training. Inspections help reduce the "truck factor" which is how many team members would need to be struck by a truck to halt the project. Inspections training effects also deliver benefits later in testing - reducing the time to locate the cause of the symptom detected. One more training benefit is that best [or at least good] practices spread faster and bad practices get extincted faster with inspections than without them, MUCH faster! The value of exposing developers to others products shouldn't be overlooked.

Author's Response:
6/26/2002    
Robert -- You're absolutely right! Cross-training and giving other team members a look at the internals of your work products is a great benefit of any type of peer review. The reviewers learn about the product so they can step in when the truck hits, and they learn about other coding styles, language features, ways to write requirements, and more. I didn't mean to slight this benefit, but from a metrics point of view, I don't know how to measure it. It's one of the many intangible -- but real -- benefits that reviews and inspections offer. Thanks for the reminder.

 
 
Comment:    
by Matthew Edwards 6/25/2002

Good article. Thank you. I enjoyed the content and found it similar to other elements I've reviewed, read and/or practiced in he past including methods of defect classification, analysis and reporting (e.g. IBM and Orthogonal Defect Classification comes to mind)... as well as... Gilb's book on software inspection (which I quite enjoyed as well). What I glean from this article (and some reader feedback seems to support) are a couple of notions including 1) document and measure in order to learn, and 2) what metrics and their use may be important to one... may not be important to another. I don't look for these articles to solve all of my...Read On

Author's Response:
6/26/2002    
Matthew -- You're welcome! Glad you enjoyed it.

 
 
Comment:    
by Gerold Keefer 6/25/2002

karl, thanks for showing how easy inspection effectiveness, efficiency, and roi can be determined. it seems large parts of the industry are not seriously interested in those numbers - and don't do inspections. being convinced that there is on average around one defect per page always helps me during inspections to finally find the problems.

Author's Response:
6/26/2002    
Gerold -- It's disappointing how few software people even know about, let alone routinely practice, inspections, although they've been demonstrating their value for nearly 3 decades. Too many people are concerned about the time they take (which is real), instead of about the time they can save (which is potential). I would hope that everyone who holds effective reviews would have enjoyed the good feeling that comes from having a peer, rather than a customer, discover a defect, even if they can't quantify their ROI to 8 decimal places.

 
 
Comment:    
by edA-qa mort-ora-y 6/25/2002

Isolating metrics in any particular activity, without considering their complete relation to the entire development process, will yield whatever results you want them to yield. This may serve only as a short introduction and get one started to using statistical analysis. If you want to use metrics effectively you need to educate yourself about statistics and understand your complete process thoroughly -- incorrectly used metrics are probably worse than an instinctive feeling about effectiveness.

Author's Response:
6/26/2002    
You're absolutely right. The concern is to avoid measurement dysfunction. For example, if you are measuring only defects found (particularly if you are rewarding people for this or setting targets), people might spend inordinate amounts of time attempting to find as many defects as possible, which hurts your ROI for no useful benefit. Measuring aspects of your inspection process is secondary to actually performing the inspections. Managers and practitioners alike will probably want to know what benefits the inspections are yielding, though, so a balanced set of metrics can answer some of those important questions.

 
 
Comment:    
by Tek Wallah 6/24/2002

I read "Peer Reviews in Software" a couple of months ago out of frustration that our QA process, stuck at the end of development, wasn't delivering bang for the buck. My own experience of code walkthroughs was that they were a waste of time: a group of sleepy programmers not in any position or mood to spot problems in code that was being explained by the perpetrator. I was struck by Mr Wiegers' distinction between team walkthroughs and true inspections -- of all phases of the project starting with requirements gathering -- and performed by a group of knowledgeable outsiders. That's obviously what we need and I'm sure it would pay off -- if I...Read On

Author's Response:
6/26/2002    
Tek -- As with all new skills, you have to grow a team of competent and enthusiastic reviewers. Review programs can be led by practitioners who have already experienced the benefits, perhaps at another company, who can be opinion leaders for their skeptical or less experienced teammates. Otherwise, a leap of faith is involved. People are skeptical that they can get the benefits reported in the literature (if they even know about the literature). Poor previous review experiences, as you described, are demotivating and give the impression that reviews are a waste of time. Sure, they can be, but they don't have to be! Everyone needs to respect the learning curve as they pick up new practices -- they will make you go slower until you learn how to make the methods work best for you and your team.

 
 
Comment:    
by Erik Petersen 6/24/2002

I think it is important to go broader than "defects". One methodology I used prefered the word "issue". In design documents, we could have issues of ambiguity, contradiction, unexplained gaps or undefined terms, etc, that need clarification so they wouldn't have multiple interpretations or cause confusion down the track. Code reviews could also identify areas that needed extra comments (or just any comments!), or complex areas of code that may work now but could be broken during maintenance if they weren't understood properly. Though these issues can multiple into many defects later in the project, by themselves they were not defects and...Read On

Author's Response:
6/26/2002    
Erik -- I would consider ambiguities and contradictions found in design documents as legitimate defects, not simply "issues." They are not defects in the ultimately delivered software (although as you point out, they can lead to defects), but they are certainly defects in the work product in which they are found. The big benefit of inspecting early stage deliverables such as requirements and design documents is that removing defects from them has a great leveraging effect compared to correcting the consequences of those defects manifested in code.

 
Back to Top



 
Ads By Google
What's This?
 
 



Home   |   Resources   |   Topics   |   Community   |   PowerPass



© 2010 StickyMinds.com. All rights reserved.
StickyMinds.com is a division of Software Quality Engineering.
Privacy Policy    Terms & Conditions    Link to StickyMinds.com    Feedback


Infosys

TechExcel, Inc.




STAREAST 


Better Software Conference