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”:
- Review the code, not the people.
- Review what computers can’t review.
- Give constructive feedback.
- Praise good work.
- Everybody can and should review everybody’s code.
- Stay humble.