Introduction to Code Reviews

15
www.orbitone.com Raas van Gaverestraat 83 B-9000 GENT, Belgium E-mail [email protected] Website www.orbitone.com Tel. +32 9 265 74 20 Fax +32 9 265 74 10 VAT BE 456.457.353 Bank 442-7059001-50 (KBC) 30 April, 2009 Introduction to Code Reviews by Mel Gerats

description

Tips and best practices for conducting code reviews and pair programming.

Transcript of Introduction to Code Reviews

Page 1: Introduction to Code Reviews

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

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: Introduction to Code Reviews

Why

30 April, 2009Introduction to Code Reviews, by Mel Gerats3

Page 4: Introduction to Code Reviews

430 April, 2009Introduction to Code Reviews, by Mel Gerats

Why

Improve quality of codeShare Knowledge

Check conformanceVerify completenessEducateReach a consensusTry other approaches…

Page 5: Introduction to Code Reviews

530 April, 2009Introduction to Code Reviews, by Mel Gerats

What?

InspectionTeam ReviewPair programmingWalkthroughPeer reviewAd hoc

Page 6: Introduction to Code Reviews

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: Introduction to Code Reviews

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: Introduction to Code Reviews

830 April, 2009Introduction to Code Reviews, by Mel Gerats

Pair Programming

Less formalShare knowledgeShort sessions1 task

Goal: Prevent defects, share knowledge

Page 9: Introduction to Code Reviews

930 April, 2009Introduction to Code Reviews, by Mel Gerats

Peer review

InformalAsynchronousOne or more people

Find defects, improve quality

Page 10: Introduction to Code Reviews

1030 April, 2009Introduction to Code Reviews, by Mel Gerats

Ad Hoc

Can you take a look at this?

Goal: second opinion

Page 11: Introduction to Code Reviews

1130 April, 2009Introduction to Code Reviews, by Mel Gerats

How

Peer reviewsPair ProgrammingAd hoc

Page 12: Introduction to Code Reviews

1230 April, 2009Introduction to Code Reviews, by Mel Gerats

How: Review

Code, not the programmerSubstance, not styleConstructive criticism

Page 13: Introduction to Code Reviews

1330 April, 2009Introduction to Code Reviews, by Mel Gerats

How: Pair Programming

Short sessionsOne problem at a timePlan!

Page 15: Introduction to Code Reviews

www.orbitone.com

15 Introduction to Code Reviews, by Mel Gerats30 April, 2009