Page 1
www.orbitone.com
Raas van Gaverestraat 83B-9000 GENT, Belgium E-mail [email protected] Website www.orbitone.com
Tel. +32 9 265 74 20Fax +32 9 265 74 10VAT BE 456.457.353Bank 442-7059001-50 (KBC)
30 April, 2009 Introduction to Code Reviewsby Mel Gerats
Page 2
Introduction to Code Reviews, by Mel Gerats2
Definitionhttp://en.wikipedia.org/wiki/Code_review
Code review is systematic examination (often as peer review) of computer source code intended to find and fix mistakes overlooked in the initial development phase, improving both the overall quality of software and the developers' skills.
30 April, 2009
Page 3
Why
30 April, 2009Introduction to Code Reviews, by Mel Gerats3
Page 4
430 April, 2009Introduction to Code Reviews, by Mel Gerats
Why
Improve quality of codeShare Knowledge
Check conformanceVerify completenessEducateReach a consensusTry other approaches…
Page 5
530 April, 2009Introduction to Code Reviews, by Mel Gerats
What?
InspectionTeam ReviewPair programmingWalkthroughPeer reviewAd hoc
Page 6
630 April, 2009Introduction to Code Reviews, by Mel Gerats
Inspection, Team Review
FormalPlanned, preparedClear roles (moderator, author, reviewers, note taker…)Goal: find defects
Page 7
730 April, 2009Introduction to Code Reviews, by Mel Gerats
Walkthrough
Author takes the leadLess detailHigher levelReviewers take notes
Goal: knowledge sharing, find defects
Page 8
830 April, 2009Introduction to Code Reviews, by Mel Gerats
Pair Programming
Less formalShare knowledgeShort sessions1 task
Goal: Prevent defects, share knowledge
Page 9
930 April, 2009Introduction to Code Reviews, by Mel Gerats
Peer review
InformalAsynchronousOne or more people
Find defects, improve quality
Page 10
1030 April, 2009Introduction to Code Reviews, by Mel Gerats
Ad Hoc
Can you take a look at this?
Goal: second opinion
Page 11
1130 April, 2009Introduction to Code Reviews, by Mel Gerats
How
Peer reviewsPair ProgrammingAd hoc
Page 12
1230 April, 2009Introduction to Code Reviews, by Mel Gerats
How: Review
Code, not the programmerSubstance, not styleConstructive criticism
Page 13
1330 April, 2009Introduction to Code Reviews, by Mel Gerats
How: Pair Programming
Short sessionsOne problem at a timePlan!
Page 14
30 April, 2009Introduction to Code Reviews, by Mel Gerats14
Resources
IDesign Coding Standard
Effective Code Reviews Without the Pain Pair Programming on Wikipedia
http://www.processimpact.com/pubs.shtml#prSeven Truths About Peer ReviewsSeven Deadly Sins of Software ReviewsWhen Two Eyes Aren’t Enough
http://stackoverflow.com/questions/tagged/code-review
http://en.wikipedia.org/wiki/Code_review
Page 15
www.orbitone.com
15 Introduction to Code Reviews, by Mel Gerats30 April, 2009