Commandments for code review

Code review is the practice of soliciting and giving feedback on code. At work, reviewing is an integral part of our software engineering process. Code won’t be merged to the master before at least one person has reviewed it — the only exception is experimental research code. This means that over the past two years, I’ve reviewed a lot of code.

How do you review code, then? I’ve distilled my experience into a short list of ”commandments”:

  1. Review the code, not the people.
  2. Review what computers can’t review.
  3. Give constructive feedback.
  4. Praise good work.
  5. Everybody can and should review everybody’s code.
  6. Stay humble.

Comments or questions? Tweet to me or send me an e-mail.