Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cole Cecil. Peer Code Review 2 Why do a peer code review? Find defects earlier Find different kinds of defects Share knowledge among peers Maintainability.

Similar presentations


Presentation on theme: "Cole Cecil. Peer Code Review 2 Why do a peer code review? Find defects earlier Find different kinds of defects Share knowledge among peers Maintainability."— Presentation transcript:

1 Cole Cecil

2 Peer Code Review 2

3 Why do a peer code review? Find defects earlier Find different kinds of defects Share knowledge among peers Maintainability of code is improved Encourages developers to do better work 3

4 Types of peer code reviews Formal inspection Over-the-shoulder review Pair programming Email pass-around Tool-assisted review 4

5 Peer review best practices Don’t go too fast Less than 300 – 400 lines of code per hour Don’t review too much code at once No longer than 90 minutes No more than 400 lines of code Annotate before the review Track goals and metrics Use checklists Not too long Focus on trouble areas and easily forgotten things 5

6 Peer review best practices (continued) Review code before checking it in Keeps defects from becoming part of the product, but can slow development Designate one or more experienced people as primary reviewers At least one primary reviewer should be involved reviewing each piece of code Verify that all review comments are resolved Keep a good attitude about defects View them as improvements to the application View them as opportunities to learn If you can’t review everything, still review some things Keeps developers learning Encourages developers to write better code 6

7 Tools for peer code review Commerical Tools Crucible CodeCollaborator Free Tools Review Board Rietveld Gerrit Codestriker 7

8 Static Code Analysis Tools 8

9 What are static code analysis tools? Tools that analyze code without running it Can find be used to find bugs such as: Security issues Performance issues Memory issues Potential errors Not adhering to coding standards Can often be integrated with an IDE A good way to reduce the number of bugs before doing peer code review 9

10 Limitations of static code analysis tools False positives False negatives Can’t detect some types of issues 10

11 Examples of static code analysis tools A few Java tools CheckStyle FindBugs PMD Many, many more http://en.wikipedia.org/wiki/List_of_tools_for_static_c ode_analysis http://en.wikipedia.org/wiki/List_of_tools_for_static_c ode_analysis 11

12 References 11 Best Practices for Peer Code Review. Retrieved from http://support.smartbear.com/resources/cc/11_Best_Practices_for_Peer_Code_ Review.pdf http://support.smartbear.com/resources/cc/11_Best_Practices_for_Peer_Code_ Review.pdf Bilias, S. Peer Code Reviews At Loose Cannon. Retrieved from http://scottbilas.com/blog/peer-code-reviews-at-loose-cannon http://scottbilas.com/blog/peer-code-reviews-at-loose-cannon Five Types of Review. Retrieved from http://support.smartbear.com/resources/cc/book/code-review-types.pdf http://support.smartbear.com/resources/cc/book/code-review-types.pdf Gomez, I., Morgado, P., Gomez, T., & Moreira, R. An Overview on the Static Code Analysis Approach in Software Development. Retrieved from http://paginas.fe.up.pt/~ei05021/TQSO%20- %20An%20overview%20on%20the%20Static%20Code%20Analysis%20approa ch%20in%20Software%20Development.pdf http://paginas.fe.up.pt/~ei05021/TQSO%20- %20An%20overview%20on%20the%20Static%20Code%20Analysis%20approa ch%20in%20Software%20Development.pdf Peer Code Review: An Agile Process. Retrieved from http://support.smartbear.com/resources/cc/Peer-Code-Review_An-Agile- Process.pdf http://support.smartbear.com/resources/cc/Peer-Code-Review_An-Agile- Process.pdf Rubinstein, D. Making the case for code review. Retrieved from http://www.sdtimes.com/link/34294 http://www.sdtimes.com/link/34294 12


Download ppt "Cole Cecil. Peer Code Review 2 Why do a peer code review? Find defects earlier Find different kinds of defects Share knowledge among peers Maintainability."

Similar presentations


Ads by Google