Introduction to Software Review


Published on

Published in: Technology, Education
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Introduction to Software Review

  1. 1. Introduction to Software Review Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii
  2. 2. Objectives <ul><li>Understand the motivation for technical review. </li></ul><ul><li>Become acquainted with “best practices” for “industrial strength” formal technical review. </li></ul><ul><li>Begin the journey toward 'optimal' review in your own practice. </li></ul>
  3. 3. Optimal Review <ul><li>For me, an 'optimal' review will: </li></ul><ul><ul><li>find all important defects </li></ul></ul><ul><ul><li>give all reviewers deep insight into the code </li></ul></ul><ul><ul><li>enable the author to improve the code </li></ul></ul><ul><ul><li>all with least possible effort </li></ul></ul><ul><li>In other words: </li></ul><ul><ul><li>Optimal quality improvement </li></ul></ul><ul><ul><li>Optimal knowledge acquisition </li></ul></ul><ul><ul><li>With lowest possible cost </li></ul></ul><ul><li>Normally, though, it ’s “pick any two”. </li></ul>
  4. 4. Families of Review Methods <ul><li>Walkthroughs </li></ul>Minimal overhead Developer training Quick turnaround Defect discovery Ambiguity resolution Training Method Family Typical Goals Typical Attributes Little/no preparation No formal process No measurement <ul><li>Technical Reviews </li></ul>Some formal process Multiple stages Wide range of discussion Inspections Detect and remove all defects efficiently and effectively. Very formal process Measurement Verification
  5. 5. Methods vs. Optimality <ul><li>Walkthroughs: </li></ul><ul><ul><li>Cost: very low </li></ul></ul><ul><ul><li>Knowledge transfer: undependable </li></ul></ul><ul><ul><li>Quality improvement: undependable </li></ul></ul><ul><li>Technical reviews: </li></ul><ul><ul><li>Cost: moderate </li></ul></ul><ul><ul><li>Knowledge transfer: better </li></ul></ul><ul><ul><li>Quality improvement: at least some </li></ul></ul><ul><li>Inspection: </li></ul><ul><ul><li>Cost: high (and not necessarily ‘least possible’) </li></ul></ul><ul><ul><li>Knowledge transfer: almost guaranteed. </li></ul></ul><ul><ul><li>Quality improvement: almost guaranteed </li></ul></ul>
  6. 6. What reviews do that testing doesn't <ul><li>1. Reviews improve schedule predictability. </li></ul><ul><li>2. Reviews reduce rework. </li></ul><ul><ul><li>Rework can account for 44% of dev. cost! </li></ul></ul><ul><ul><ul><li>Reqs (1%), Design (12%), Coding (12%), Testing (19%) </li></ul></ul></ul><ul><li>3. Reviews are pro-active tests. </li></ul><ul><ul><li>Find errors not possible through testing, such as Errors of Omission (i.e. unimplemented requirement) </li></ul></ul><ul><li>4. Reviews are training. </li></ul><ul><ul><li>Domain, corporate standards, group. </li></ul></ul>N o R e v s . R e v s Req Design Code Test R R R Req Design Code Test
  7. 7. Industry experience <ul><li>Aetna Insurance Company: </li></ul><ul><ul><li>Review found 82% of errors, 25% cost reduction. </li></ul></ul><ul><li>Bell-Northern Research: </li></ul><ul><ul><li>Inspection cost: 1 hour per defect. </li></ul></ul><ul><ul><li>Testing cost: 2-4 hours per defect. </li></ul></ul><ul><ul><li>Post-release cost: 33 hours per defect. </li></ul></ul><ul><li>Hewlett-Packard </li></ul><ul><ul><li>Est. 1 year savings (1993): $21,454,000 </li></ul></ul><ul><li>IBM (using Cleanroom) </li></ul><ul><ul><li>C system software </li></ul></ul><ul><ul><li>No errors from time of first compile. </li></ul></ul>
  8. 8. There are many different kinds of review TekInspect Development Method Non-Cleanroom Cleanroom FTR inFTR Code Inspection (Fagan76) Inspection (Gilb93) 2-Person Inspection (Bisant89) N-Fold Inspection (Martin90) Walkthrough (Yourdon89) Verification- based Inspection (Dyer92) Active Design Reviews (Parnas85) FTArm (Johnson94) ICICLE (Brothers90) Scrutiny (Gintell93) CAIS (Mashayekhi94) Manual Tool-Based Code Reading (McConnell93) Software Review (Humphrey90) Phased Insp. (Knight93)
  9. 9. Inspection: the most formal review Preparation Orientation Planning Review Meeting Rework Verify Ensure rework was done correctly Correct defects. Consolidate issues. <ul><li>Check product, note issues. </li></ul><ul><li>Present product, process, goals. </li></ul>Choose team, materials, dates.
  10. 10. Planning <ul><li>Objectives </li></ul><ul><ul><li>Gather review package : work product, checklists, references, and data sheets. </li></ul></ul><ul><ul><li>Form inspection team. </li></ul></ul><ul><ul><li>Determine dates for meetings. </li></ul></ul>Planning Orientation Preparation Review Mt. Rework Verify
  11. 11. Orientation <ul><li>Objectives </li></ul><ul><ul><li>Author provides overview. </li></ul></ul><ul><ul><li>Reviewers obtain review package. </li></ul></ul><ul><ul><li>Preparation goals established. </li></ul></ul><ul><ul><li>Reviewers commit to participate. </li></ul></ul>Planning Orientation Preparation Review Mt. Rework Verify
  12. 12. Preparation <ul><li>Objectives </li></ul><ul><ul><li>Find maximum number of non-minor issues. </li></ul></ul>Planning Orientation Preparation Review Mt. Rework Verify
  13. 13. Example Issue Classification <ul><li>Critical </li></ul><ul><ul><li>Defects that may cause the system to hang, crash, produce incorrect results or behavior, or corrupt user data. No known work-arounds. </li></ul></ul><ul><li>Severe </li></ul><ul><ul><li>Defects that cause incorrect results or behavior with known work-arounds. Large and/or important areas of the system is affected. </li></ul></ul><ul><li>Moderate </li></ul><ul><ul><li>Defects that affect limited areas of functionality that can either be worked around or ignored. </li></ul></ul><ul><li>Minor </li></ul><ul><ul><li>Defects that can be overlooked with no loss of functionality. </li></ul></ul>
  14. 14. Review Meeting <ul><li>Objectives </li></ul><ul><ul><li>Create consolidated, comprehensive listing of non-minor issues. </li></ul></ul><ul><ul><li>Provide opportunity for group synergy. </li></ul></ul><ul><ul><li>Improve reviewing skill by observing others. </li></ul></ul><ul><ul><li>Create shared knowledge of work product. </li></ul></ul>Planning Orientation Preparation Review Mt. Rework Verify
  15. 15. Rework <ul><li>Objectives </li></ul><ul><ul><li>Assess each issue, determine if it is a defect, and remove it if necessary. </li></ul></ul><ul><ul><li>Produce written disposition of non-minor issue. </li></ul></ul><ul><ul><li>Resolve minor issues as necessary. </li></ul></ul>Planning Orientation Preparation Review Mt. Rework Verify
  16. 16. Verify <ul><li>Objectives </li></ul><ul><ul><li>Assess the (reworked) work product quality. </li></ul></ul><ul><ul><li>Assess the inspection process. </li></ul></ul><ul><ul><li>Pass or fail the work product. </li></ul></ul>Planning Orientation Preparation Review Mt. Rework Verify
  17. 17. ICS Software Engineering Technical Reviews
  18. 18. Goals for our Tech. Reviews <ul><li>1. Learn how to obtain useful feedback from classmates about your software system. </li></ul><ul><li>2. Learn how to critically read and evaluate code written by another developer. </li></ul><ul><li>3. Learn the difference between low-impact, “waste of time” reviews and high-impact, “would have never noticed this myself” reviews. </li></ul><ul><li>4. Learn that reviewing other code can be an effective way to improve your own coding skills. </li></ul>
  19. 19. Initial approach: Checklist-based technical review <ul><li>Use a checklist to: </li></ul><ul><ul><li>focus reviewer attention. </li></ul></ul><ul><ul><li>specify the concerns of the review </li></ul></ul><ul><li>Write down reviewer comments to: </li></ul><ul><ul><li>provide a clear record of reviewer feedback. </li></ul></ul><ul><ul><li>assess coverage of review. </li></ul></ul><ul><li>Go over reviewer comments with author to: </li></ul><ul><ul><li>Clarify meaning of comments. </li></ul></ul><ul><ul><li>Assess validity. </li></ul></ul><ul><ul><li>Provide opportunity for new issues to arise. </li></ul></ul>
  20. 20. Goals for the semester <ul><li>We will be doing reviews all semester. </li></ul><ul><li>When doing a review, ask yourself: </li></ul><ul><ul><li>Is my review revealing problems? </li></ul></ul><ul><ul><li>Is my review increasing understanding? </li></ul></ul><ul><ul><li>Is my review doing (1) and (2) efficiently? </li></ul></ul><ul><li>If not, think about ways to improve your review process. </li></ul>
  21. 21. Bonus: How to ask questions <ul><li>Effective software review requires effective technical communication. </li></ul><ul><li>&quot;How to ask questions the smart way&quot; addresses effective communication in another context: online discussion forums. </li></ul><ul><li>Use this semester to improve your ability to &quot;ask questions the smart way&quot;. </li></ul><ul><ul><li>We will likely see examples of &quot;smart&quot; and &quot;not so smart&quot; questions to the class discussion group! </li></ul></ul>