Peer Code Review:  An Agile Process
Gregg Sporar Senior Product Manager [email_address] http://blog.smartbear.com  http://twitter.com/smartbears
Code  Collaborator codecollaborator.com
 
 
 
But is code review  really  Agile?
Individuals and interactions  over processes and tools  Working software  over comprehensive documentation  Customer collaboration  over contract negotiation  Responding to change  over following a plan  The Manifesto
Individuals and interactions  over processes and tools  Working software   over comprehensive documentation  Customer collaboration  over contract negotiation  Responding to change  over following a plan   The Manifesto
Working software is the primary measure of progress.   Manifesto Principles - I
Working software  is the primary measure of progress.   Manifesto Principles - I
Requirements Design Architecture
Requirements Design Architecture Code Discussion Review Review Where many of the bugs come from  (void)0
Professional Writers Have Editors
 
Spell Czech: Good, butt knot enough
ROI: The Experiment
Rule of Bug: Earlier == Cheaper What if we had Peer Review? ? ? ?
$152k, down from $368k 32, down from 194
Move the Feedback
Agile processes promote sustainable development.  The sponsors, developers, and users should be able  to maintain a constant pace indefinitely.  Manifesto Principles - II
Agile processes promote  sustainable development.  The sponsors, developers, and users should be able  to maintain a constant pace indefinitely.   Manifesto Principles - II
Bus Number >= 2
Collective Code Ownership
Continuous attention to technical excellence  and good design enhances agility.  Manifesto Principles - III
Continuous attention to  technical excellence  and  good design  enhances agility.   Manifesto Principles - III
The Ego Effect
 
if(“integrate”.equals( s )) Continuous Learning
Are the meetings necessary?
Can We Avoid:
Formal Inspections Michael Fagan, IBM, 1976
Fagan Phases = Meeting
 
 
 
 
4%
Fagan Phases = Meeting
Code review  without  meetings?
Over-the-Shoulder Easy / Free Interruption No info Recorded Walk-through
Email Easy / Free No Interruption / Remote Conversation Tracking Info. Hard to Retrieve No End?
Pair Programming No Tools or Workflow Deep Thought Big Time Commitment No Info. Recorded Too Close
Tool-Assisted Review
Typical review process
Reviewers Identify Changes Package/Deliver Organize Communication Track Defects Audit Trail Reports Automatic Metrics Hapless Developer Version Control
Tool-Assisted Review Collection Communication Chronicling Install and Maintain Time or Money
Tools Code Collaborator Commercial Crucible Commercial Review Board Open-Source Rietveld Free/Hosted
What’s the most efficient use of time?
Cisco® MeetingPlace® Case Study 3,200,000 lines of code 2,500 reviews 50 developers 10 months San Diego, Bangalore, Budapest s
CodeReviewBook.com
60-90 minutes max Time (minutes) Defects Found
Go slow:  200-500 LOC/hour
Not too much:  200-400 LOC
Author Preparation is   ??? Good!
Checklists
Checklist for Checklists 7    2 (George Miller, 1952) No obvious stuff Nothing that can be automated Stuff that’s easy to forget EXAMPLE: Errors handled properly in all cases
Version Control: Before or after check-in?
But won’t people  hate  doing code reviews?
Start Slowly
Selected Code Only Stable branch Core modules/10 scariest files Unit tests
No Flaming
Review the code,  not  the coder Ask, Don’t Tell Don’t Accuse We All Make Mistakes
Careful Use of Metrics
We’re Agile -  No  Metrics!
Numbers, Numbers, Numbers LOC Time Defects Inspection and Defect Rates Defect Density
 
Defect rates for a reviewer are task-independent
The meaning of metrics depends on the goal of the review
Properly Adjusted, Code Review  is  Agile
Gregg Sporar Senior Product Manager [email_address] http://blog.smartbear.com  http://twitter.com/smartbears

Peer Code Review An Agile Process