Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
How And When To Code Review
Paul Gower

@paulmgower
I’m Paul Gower.
Principal Consultant at Lunamark

@paulmgower
AGENDA
What Is Code Review1
2
3
How and When
Why Code Review
What Is Code Review
1
Father of Code Review
http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=5388086&filter%3DAND%28p_IS_Number%3A53880...
Fagan Inspections
Good for Mission Critical Software
Code
Review
History
Over-the-shoulder
Email pass-around
Email pass-around
Please don’t do this!
Pair Programming
Tool-Assisted Code Review
Tool-Assisted Code Review
Tool-Assisted Code Review
Tool-Assisted Code Review
Tool-Assisted Code Review
Tool-Assisted Code Review
Tool-Assisted Code Review
Tool-Assisted Code Review
Tool-Assisted Code Review
How and When
2
How NOT to Code Review
Don’t
Be This
Guy
Reviewer: Focus on the code
Reviewer: Focus on the code
Don’t say: “You didn’t name these variables well!”
Reviewer: Focus on the code
Don’t say: “You didn’t name these variables well!”
Instead: “I don’t understand these variable...
Reviewer: Be respectful
Reviewer: Find a positive point
Developer: Be humble
Developer: Prepare Before
Tips and Tricks
Less Than 200 Lines Of Code
Less Than 60 Minutes
Less Than 60 Minutes
http://www.news.illinois.edu/news/11/0208focus_AlejandroLleras.html
Daily Code Review
Daily Code Review
http://blog.fogcreek.com/effective-code-reviews-9-tips-from-a-converted-skeptic/
Always Use A Checklist
Always Use A Checklist
http://www.codeproject.com/Articles/593751/Code-Review-Checklist-and-Guidelines-for-Csharp-De
Don’t Review What Can Be
Automated
Static Code Analysis Tools
Static Code Analysis Tools
Static Code Analysis Tools
Static Code Analysis Tools
Static Code Analysis Tools
Static Code Analysis Tools
3
Why Code Review
“
“…the average defect detection rate
is only 25 percent for unit testing,
35 percent for function testing, and
45 percent...
Before
After 2%
55%
Code Review Case Studies
Code Review Case Studies
Without
With 0.82 errors / 100 loc
4.5 errors / 100 loc
Before Code Reviews
After Code Reviews
Reasons to Code Review
Save Money
Easier To Find
Other’s Mistakes
Use Peer Pressure
To Your Advantage
Alternative
Implementations
Knowledge
Sharing
“
“The aim is to catch
what mistakes you can
and to get better – not
to attempt perfection.”
- Erik Dietrich,
“Creating Yo...
Review
• No more than 60 mins
• No more than 200 lines of code
• Use Static Code Analysis
• Use Check Lists
• Use A Code R...
THANK YOU!
@paulmgower

http://bit.ly/cs2016-cr
How and When To Code Review
How and When To Code Review
How and When To Code Review
How and When To Code Review
How and When To Code Review
How and When To Code Review
Upcoming SlideShare
Loading in …5
×

How and When To Code Review

219 views

Published on

Are you a software developer who wants to improve your skills? Are you a team lead who enjoys mentoring other developers and improving both their and your coding skills? Or are you a manager who needs to improve the knowledge sharing among your software developers across different projects? Today we will be talking about how Code Reviews can do just this and also improve the code quality of your software projects in the process. Code Review can be a great way to get to know your fellow developers and even learn a different or sometimes better way to build a software solution. At the end of the session you will have a better understanding of the benefits of Code Review as well as some great tips to use in your team today.

Published in: Software
  • Be the first to comment

  • Be the first to like this

How and When To Code Review

  1. 1. How And When To Code Review Paul Gower @paulmgower
  2. 2. I’m Paul Gower. Principal Consultant at Lunamark @paulmgower
  3. 3. AGENDA What Is Code Review1 2 3 How and When Why Code Review
  4. 4. What Is Code Review 1
  5. 5. Father of Code Review http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=5388086&filter%3DAND%28p_IS_Number%3A5388084%29 aka Fagan Inspections
  6. 6. Fagan Inspections Good for Mission Critical Software
  7. 7. Code Review History
  8. 8. Over-the-shoulder
  9. 9. Email pass-around
  10. 10. Email pass-around Please don’t do this!
  11. 11. Pair Programming
  12. 12. Tool-Assisted Code Review
  13. 13. Tool-Assisted Code Review
  14. 14. Tool-Assisted Code Review
  15. 15. Tool-Assisted Code Review
  16. 16. Tool-Assisted Code Review
  17. 17. Tool-Assisted Code Review
  18. 18. Tool-Assisted Code Review
  19. 19. Tool-Assisted Code Review
  20. 20. Tool-Assisted Code Review
  21. 21. How and When 2
  22. 22. How NOT to Code Review
  23. 23. Don’t Be This Guy
  24. 24. Reviewer: Focus on the code
  25. 25. Reviewer: Focus on the code Don’t say: “You didn’t name these variables well!”
  26. 26. Reviewer: Focus on the code Don’t say: “You didn’t name these variables well!” Instead: “I don’t understand these variable names, can you help me understand them?”
  27. 27. Reviewer: Be respectful
  28. 28. Reviewer: Find a positive point
  29. 29. Developer: Be humble
  30. 30. Developer: Prepare Before
  31. 31. Tips and Tricks
  32. 32. Less Than 200 Lines Of Code
  33. 33. Less Than 60 Minutes
  34. 34. Less Than 60 Minutes http://www.news.illinois.edu/news/11/0208focus_AlejandroLleras.html
  35. 35. Daily Code Review
  36. 36. Daily Code Review http://blog.fogcreek.com/effective-code-reviews-9-tips-from-a-converted-skeptic/
  37. 37. Always Use A Checklist
  38. 38. Always Use A Checklist http://www.codeproject.com/Articles/593751/Code-Review-Checklist-and-Guidelines-for-Csharp-De
  39. 39. Don’t Review What Can Be Automated
  40. 40. Static Code Analysis Tools
  41. 41. Static Code Analysis Tools
  42. 42. Static Code Analysis Tools
  43. 43. Static Code Analysis Tools
  44. 44. Static Code Analysis Tools
  45. 45. Static Code Analysis Tools
  46. 46. 3 Why Code Review
  47. 47. “ “…the average defect detection rate is only 25 percent for unit testing, 35 percent for function testing, and 45 percent for integration testing. In contrast, the average effectiveness of design and code inspections are 55 and 60 percent.” - Steve McConnell, Code Complete, 2004
  48. 48. Before After 2% 55% Code Review Case Studies
  49. 49. Code Review Case Studies Without With 0.82 errors / 100 loc 4.5 errors / 100 loc
  50. 50. Before Code Reviews
  51. 51. After Code Reviews
  52. 52. Reasons to Code Review
  53. 53. Save Money
  54. 54. Easier To Find Other’s Mistakes
  55. 55. Use Peer Pressure To Your Advantage
  56. 56. Alternative Implementations
  57. 57. Knowledge Sharing
  58. 58. “ “The aim is to catch what mistakes you can and to get better – not to attempt perfection.” - Erik Dietrich, “Creating Your Code Review Checklist”, 2015
  59. 59. Review • No more than 60 mins • No more than 200 lines of code • Use Static Code Analysis • Use Check Lists • Use A Code Review Tool
  60. 60. THANK YOU! @paulmgower http://bit.ly/cs2016-cr

×