May the Code Review be with you [English]

Faf4a633b0d1e32a07a071039686c868?s=47 Egor Tolstoy
September 22, 2017

May the Code Review be with you [English]

Code review is often mistaken for a silver bullet that solves all the developer problems. In reality it's not exactly like that, and this process has its requirements and constraints, just like everything else. We'll talk about what teams can benefit from code review and how to approach this process. We'll get into the details of process, measure the time it takes and learn to assess its usefulness.

Also the main rules of conducting a code review will be shown: both technical and ethical ones that can have positive impact not only on product quality but also on the team making it.

Faf4a633b0d1e32a07a071039686c868?s=128

Egor Tolstoy

September 22, 2017
Tweet

Transcript

  1. Egor Tolstoy telegram.me/ twitter.com/ etolstoy igrekde

  2. 2

  3. 3

  4. 4

  5. 5

  6. 6

  7. 7 May the Code Review be with you

  8. 8 Goals Practices Ethics Code Review

  9. 9 Goals Practices Ethics Code Review

  10. 10 Knowledge Sharing in a Team

  11. 11

  12. 12

  13. 13

  14. 14

  15. 15 Shared Code Ownership

  16. 16 Code reuse

  17. 17 Error Diagnosis

  18. 18 Project Consistency

  19. 19 #1: Shared Code Ownership #2: Code reuse #3: Knowledge

    sharing in a team #4: Error diagnosis #5: Project consistency
  20. 20 Goal-Question-Metric 1. Identify the goal 2. List the questions

    3. Determine the metrics
  21. 21 Goal «Increase code reuse»

  22. 22 Questions Are we using shared libraries in the code?

    Did we extract all visual styles? What is a level of code duplication?
  23. 23 Metrics Number of shared libraries Number of hardcoded styles

    Level of code duplication
  24. 24 The plan is completed by 60%

  25. 25 Goals Practices Ethics Code Review

  26. 26 Who conducts a review? When to conduct a review?

    How to conduct a review?
  27. 27 Who conducts a review? When to conduct a review?

    How to conduct a review?
  28. 28 Small team Several independent teams Large team Single developer

  29. 29

  30. 30 Author Reviewer 1 Reviewer 2 Reviewer 3 Review

  31. Author Reviewer 1 Reviewer 2 Reviewer 3 Review

  32. 32

  33. 33 Team Lead Team 1 Team 2

  34. Team Lead Team 1 Team 2

  35. 35 Team Lead Team 1 Team 2

  36. 36 Team Lead Team 1 Team 2

  37. 37

  38. 38 Author

  39. 39 Author

  40. Author

  41. 41

  42. 42 Slack Community Peer Lab Other colleagues

  43. 43 Who conducts a review? When to conduct a review?

    How to conduct a review?
  44. 44

  45. None
  46. 46 Who conducts a review? When to conduct a review?

    How to conduct a review?
  47. 47

  48. 48 Conduct architecture reviews

  49. 49 0 50 100 150 200 0 500 1000 1500

    2000
  50. lines of code 0 50 100 150 200 0 500

    1000 1500 2000 comments the more lines of code, the fewer comments
  51. 51 Conduct self assessment

  52. 52 Always fill review description

  53. 53 Use check lists and automate them

  54. 54 SwiftLint OCLint Infer Clang Analyzer Copy-Paste Detector

  55. 55 Code review check list automation

  56. 56 Commit messages style Commit content Commit messages spelling Linters

    Artifacts
  57. 57

  58. 58

  59. 59 Use code review tools

  60. 60 Upsource / JetBrains Crucible / Atlassian GitHub

  61. 61

  62. 62

  63. 63 Opens review in AppCode GitHub integration Powerful statistics Code

    Ownership Flexible notifications
  64. 64 Pre-commit review Snippet review Time spent for review Atlassian

    products integrations Flexible tags
  65. 65 Emoji reactions Powerful code ownership PR templates Lots of

    integrations Easy to setup
  66. 66

  67. 67 Goals Practices Ethics Code Review

  68. 68 Control your temper

  69. 69 Ask questions instead of making assumptions

  70. 70 Praise your teammates

  71. 71 Keep short and to the point

  72. 72 Criticise code not people

  73. 73 Learn to admit mistakes

  74. 74 Don't leave any comments unanswered

  75. 75 Avoid phrases with "my" or "yours"

  76. 76

  77. 77

  78. 78 Goals&Metrics

  79. 79 Goals&Metrics Team Organization

  80. 80 Goals&Metrics Team Organization Engineering Practices

  81. 81 Goals&Metrics Team Organization Engineering Practices Empathy

  82. You and your team need code review twitter.com/igrekde