Peer Code Review

9,697 views

Published on

Here is a presentation I created back in 2010 illustrating the benefits of peer code review in software development teams. I also discuss the Code Collaborator product from Smart Bear Software; the peer code review tool I use most regularly.

Published in: Technology
0 Comments
7 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
9,697
On SlideShare
0
From Embeds
0
Number of Embeds
13
Actions
Shares
0
Downloads
136
Comments
0
Likes
7
Embeds 0
No embeds

No notes for slide
  • Fagan InspectionDescriptionFagan Inspection defines a process as a certain activity with a pre-specified entry and exit criteria. In every activity or operation for which entry and exit criteria are specified Fagan Inspections can be used to validate if the output of the process complies with the exit criteria specified for the process.Typical operationsIn a typical Fagan inspection the inspection process consists of the following operations:PlanningPreparation of materialsArranging of participantsArranging of meeting placeOverviewGroup education of participants on the materials under reviewAssignment of rolesPreparationThe participants prepare their rolesInspection meetingActual finding of defectReworkRework is the step in software inspection in which the defects found during the inspection meeting are resolved by the author, designer or programmer. On the basis of the list of defects the low-level document is corrected until the requirements in the high-level document are met.Follow-upIn the follow-up phase of software inspections all defect found in the inspection meeting should be corrected (as they have been fixed in the rework phase). The moderator is responsible for verifying that this is indeed the case. He should verify if all defects are fixed and no new defects are inserted while trying to fix the initial defects. It is crucial that all defects are corrected as the costs of fixing them in a later phase of the project will be 10 to 100 times higher compared to the current costs.Lightweight
  • Peer Code Review

    1. 1. Eric J. SilvaMarch 18, 2010
    2. 2.  Overview Types of Code Review Benefits Process Tools ResourcesMarch 18, 2010 (c) 2010 Eric J. Silva 2
    3. 3.  What is Peer Code Review? Peer Code Review is the systematic examination by one’s peers of computer source code intended to find and fix mistakes overlooked in the initial development phase.1  The essence of code review is providing an author timely feedback on his or her changes1Source: http://en.wikipedia.org/wiki/Code_review March 18, 2010 (c) 2010 Eric J. Silva 3
    4. 4.  Formal  Fagan Inspection (traditional) Lightweight Over-The-Shoulder E-mail Pass-Around Pair Programming Tool Assisted • A developer looks over • Source code • Two authors develop • Authors and reviewers the authors shoulder as management system e- code together at the use specialized tools the latter walks through mails code to reviewers same workstation designed for peer code the code automatically after review check-in is madeMarch 18, 2010 (c) 2010 Eric J. Silva 4
    5. 5.  Traditional process Involves a careful and detailed process  Multiple participants  Multiple phases Developers attend a series of meetings  Review code line by line  Using printed copies of the code Extremely thorough and effective Can take too long to be practical Very difficult to do with current geographic environmentMarch 18, 2010 (c) 2010 Eric J. Silva 5
    6. 6.  Less overhead than formal code inspections Equally effective when done properly Part of the normal development process Less paper Meetings and phone calls are rare More time efficient Geographical / time zone friendly Historical and auditing capabilitiesMarch 18, 2010 (c) 2010 Eric J. Silva 6
    7. 7.  Authors need editors to catch mistakes  It is human nature that one cannot adequately proof-read ones own work Improve the overall quality of software  Algorithm Logic  Documentation Improve the developers knowledge  Development skills – new/better ways of doing things  Understanding of the application code at work Enforce and maintain coding standards Ensure maintainability of code Find bugs early to minimize re-work efforts and …March 18, 2010 (c) 2010 Eric J. Silva 7
    8. 8.  Simplified (Yet Effective) Process No Meetings Works well with all team sizes, geographical locations and time zones 1. Planning 2. Inspection 4. Complete • Upload Files • Find Defects • Check Files Into • Invite Participants • Comment & Chat Version Control 3. Rework • Fix Defects • Upload FixesMarch 18, 2010 (c) 2010 Eric J. Silva 8
    9. 9.  Author  Responsible for the changes or documents under review  Responds to comments and questions made by reviewers and observers Reviewers  Responsible for inspection, creating defects, etc.  Will come to a consensus about each questionable item  Minimum of 2 per review Observers  Are involved and make comments but they are not "vital" to the review  Usually used when you want to: ▪ Bring in someone who has special expertise on an issue ▪ Make someone aware of a change in code, but not make their participation mandatory Moderator  Maintains the pace and tenor of the review  Used for more formal review workflows where one person leads and controls the reviewMarch 18, 2010 (c) 2010 Eric J. Silva 9
    10. 10. March 18, 2010 (c) 2010 Eric J. Silva 10
    11. 11.  Commercial  Code Collaborator http://www.smartbear.com  Crucible http://www.atlassian.com/software/crucible Open Source  Review Board http://www.reviewboard.org  Rietveld http://code.google.com/p/rietveldMarch 18, 2010 (c) 2010 Eric J. Silva 11
    12. 12. Code Collaborator is a web-based, peer code review tool. Multiple, simultaneous reviewers Automated workflow enhancing author-reviewer collaboration Version control integration Multiple Clients, including Eclipse IDE and Visual Studio integration Syntax highlighting Defect-tracking with severity, type, classification, and checklists External issue/defect tracking integration Full-featured metrics, reports, and data-export Project- and role-based rules and reporting Instant messaging like communication LDAP integration for authenticationMarch 18, 2010 (c) 2010 Eric J. Silva 12
    13. 13. March 18, 2010 (c) 2010 Eric J. Silva 13
    14. 14.  CVS Subversion Git Mercurial StarTeam ClearCase Perforce Visual SourceSafe Others …March 18, 2010 (c) 2010 Eric J. Silva 14
    15. 15.  GUI and Command Line Client  Windows, Solaris, Linux, Mac OSX, BSD Eclipse IDE Integration  Update Site: http://eclipse.smartbearsoftware.com/  Eclipse 3.1+ and Java 1.5, 1.6 Visual Studio Integration  Uses Command Line Client  VS Add-in Download: http://smartbear.com/downloads/CcollabAddinSetup. msiMarch 18, 2010 (c) 2010 Eric J. Silva 15
    16. 16.  ASPX  Ruby C, C++  SGML C#  Shell CSS  Visual Basic HTML  XML Java, JSP JavaScript Perl PHP PythonMarch 18, 2010 (c) 2010 Eric J. Silva 16
    17. 17.  Best Kept Secrets of Peer Code Review Jason Cohen (2006) http://smartbear.com/codecollab-code-review-book.php Code Collaborator http://smartbear.com/products/development-tools/code-review 11 Best Practices for Peer Code Review http://smartbear.com/docs/BestPracticesForPeerCodeReview.pdf Peer Reviews in Software: A Practical Guide Karl Wiegers http://www.amazon.com/exec/obidos/ASIN/0201734850 Lightweight Tool Support For Effective Code Reviews http://www.atlassian.com/software/crucible/learn/codereviewwhitepaper.pdfMarch 18, 2010 (c) 2010 Eric J. Silva 17

    ×