Be insensitive, and keep a lifelong growth mindset.

0%

Best Practice for Code Review

Why Code Review?

  • Developers know their code will be evaluated, so they work harder.
  • It improves a developer’s own programming skills.
  • It’s an opportunity for mentoring, so the programmers you work with get smarter (and thus, more fun to hang around with).
  • It creates consistency and a culture of quality across the project.
  • It encourages team bonding.

How to run an effective code review?

  • Review fewer than 200–400 lines of code at a time
  • Aim for an inspection rate of fewer than 300–500 LOC per hour
  • Take enough time for a proper, slow review, but not more than 60–90 minutes
  • Be sure that authors annotate source code before the review begins
  • Establish quantifiable goals for code review, and capture metrics so you can improve your processes
  • Use checklists, because they substantially improve results for both authors and reviewers
  • Verify that the defects are actually fixed
  • Foster a good code review culture in which finding defects is viewed positively
  • Beware of the Big Brother effect
  • Review at least part of the code, even if you can’t do all of it, to benefit from The Ego Effect
  • Adopt lightweight, tool-assisted code reviews

More Reference: