1 / 25

Code Inspections

Code Inspections. CSSE 376, Software Quality Assurance Rose-Hulman Institute of Technology March 22, 2007. Outline. Inspections in general That is, for any type of artifact Fagan's original work on code inspections Benefits and Costs of Inspections. Inspections in General.

jenaya
Download Presentation

Code Inspections

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Code Inspections CSSE 376, Software Quality Assurance Rose-Hulman Institute of Technology March 22, 2007

  2. Outline • Inspections in general • That is, for any type of artifact • Fagan's original work on code inspections • Benefits and Costs of Inspections

  3. Inspections in General

  4. Inspection Fundamentals • Preparation • Led by a moderator • Recorded results

  5. Inspection Roles • Moderator • schedules the inspection meeting • leads the meeting • Recorder • records results • publishes results • Reviewer(s) • prepares for inspection meeting • participates during meeting • Producer • one of the authors; distributes artifact • attends inspection meeting, but does not talk (except to answer questions)

  6. Inspection Process • Planning • Preparation • Meeting • Reporting results • Rework

  7. 1. Planning • Schedule inspection meeting (time and place) [Moderator] • InviteReviewers [Producer] • Prepare materials [Producer] • Distribute materials to Reviewers [Producer]

  8. 2. Preparation • Reviewers read artifact • Reviewers annotate listing with comments • Reviewers keep track of time spent in preparation

  9. 3. Inspection Meeting • A square or octagonal table is recommended • Moderator runs the meeting • Recorder keeps minutes: • preparation time of Reviewers • comments and commenters • Reviewers contribute comments • Producer attends, but remains silent unless asked a question

  10. Dilbert on Moderating

  11. Moderating the Session • Don't go too fast -- may miss things • Don't go too slow • may not cover all of artifact • reviewers may lose concentration • Keep group on task • Record important events • Keep session to 1-2 hours in length

  12. Wrapping Up • Ask for final comments • Review action items • Recorder: send minutes to Moderator • Reviewers: send annotated listings to authors • Recorder or Moderator: send reports to participants and to management

  13. 4. Reporting Results • Summary data is sent to management • how many people participated • when the meeting took place, and for how long • how many issues were found (may be categorized) • Detailed results are sent to participants • all issues with annotations • action items

  14. 5. Rework • Authors review comments • Artifact is modified by Producers • Reviewers are notified of changes • Another inspection may be needed, depending on the number and severity of the original comments

  15. Fagan’s Work on Code Inspections

  16. Overview of Fagan's Work • Proposed use of code inspections • Demonstrated evidence that inspections were cost effective • 23% improvement in coding efficiency • careful to avoid the "Hawthorne effect"

  17. Code Inspection Checklist Examples • Mistakes • improper use of programming language • errors in algorithm or declarations • Poor style • violations of standard coding style • confusing or misleading expressions

  18. Categorizing Defects • Some errors are more serious than others • Some errors are more common than others • Objective is not perfect classification, but separation of major types

  19. Sample Categories • Major -- require investigation • Minor -- may not need immediate attention • Cosmetic -- optional improvements

  20. How many LOC per inspection? • Remember, 1-2 hours is desired length of inspection meeting • Generally 100-200 lines of code per hour is the proper pace • Thus, many inspection meetings are likely needed for the entire source code

  21. Benefits and Costs

  22. Why Do Inspections Work? • Preparation • reviewers find things that authors miss • Peer pressure • forces developers to work harder • Formal process • forces developers and reviewers to do a thorough job

  23. Costs of Inspection • Time spent in preparation • Time spent in meeting • Overhead of scheduling meeting

  24. How Could We Improve Inspections? (Some Ideas) • Reduce number of reviewers • Reduce time spent in meeting • Hold meeting asynchronously • Hold meeting via the web • What are the pros and cons to each of these?

More Related