Code Review: How And When

Principal Software Consultant and Architect at Lunamark
Aug. 18, 2016

More Related Content


Code Review: How And When

  1. Code Review How And When @paulmgower
  2. I’m Paul Gower. Principal Consultant at Lunamark @paulmgower
  3. AGENDA What Is Code Review1 2 3 How and When Why Code Review
  4. What Is Code Review 1
  5. Father of Code Review aka Fagan Inspections
  6. Fagan Inspections
  7. Code Review History
  8. Why Use Fagan Inspections?
  9. Why Use Fagan Inspections? Good for Mission Critical Software
  10. Lightweight Code Reviews
  11. Over-the-shoulder
  12. Email pass-around
  13. Email pass-around Please don’t do this!
  14. Pair Programming
  15. Tool-Assisted Code Review
  16. Tool-Assisted Code Review
  17. Tool-Assisted Code Review
  18. Tool-Assisted Code Review
  19. Tool-Assisted Code Review
  20. Tool-Assisted Code Review
  21. Tool-Assisted Code Review
  22. Tool-Assisted Code Review
  23. Tool-Assisted Code Review
  24. How and When 2
  25. Reviewer: Focus on the code
  26. Reviewer: Focus on the code Don’t say: “You didn’t name these variables well!”
  27. 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?”
  28. Reviewer: Be respectful
  29. Reviewer: Find a positive point
  30. How NOT to Code Review
  31. Author: Be humble
  32. Author: Prepare Before
  33. “ “The objective is for everyone to find defects, including the author, not to prove the work product has no defects. People exchange work products to review, with the expectation that as authors, they will produce errors, and as reviewers, they will find errors. Everyone ends up learning from their own mistakes and other people’s mistakes.” – Jerry Weinberg, “The Psychology of Computer Programming”, 1971
  34. Tips and Tricks
  35. Less Than 200 Lines Of Code
  36. Less Than 60 Minutes
  37. Less Than 60 Minutes
  38. Daily Code Review
  39. Daily Code Review
  40. Always Use A Checklist
  41. Always Use A Checklist
  42. Don’t Be This Guy
  43. Don’t Review What Can Be Automated
  44. Static Code Analysis Tools
  45. Static Code Analysis Tools
  46. Static Code Analysis Tools
  47. Static Code Analysis Tools
  48. Static Code Analysis Tools
  49. Static Code Analysis Tools
  50. 3 Why Code Review
  51. “ “…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
  52. Before 55% Code Review Case Studies
  53. Before After 2% 55% Code Review Case Studies
  54. Before Code Reviews
  55. After Code Reviews
  56. Reasons to Code Review
  57. Save Money
  58. Easier To Find Other’s Mistakes
  59. Alternative Implementations
  60. Knowledge Sharing
  61. “ “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
  62. 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
  63. THANK YOU! @paulmgower