Code review for humans
Code reviews
- My job is to find problems?
Code Review Anti-patterns
-
Nit-picking
- Automate formatting changes and things like that
- The author has put a lot of working into making the thing work, it’s frustrating to be getting comments about white space and line length etc
-
Design changes when the code works
- Code review is not the time to be doing design review
-
Inconsistent feedback
-
The ghost reviewer
- Reviewer is nowhere to be found
-
Ping pong reviews
-
Why: Knowledge sharing
- Purpose is not to reject the code
- Focus is on how easy it is to understand the code
-
When: At the end
- Too late for design
- Should have specific checks
-
How?
- Automate everything you can
- When submitting for review
- Changes should be small
- Annotate your code
- Should be clear who should review
- Respond in a timely fashion: as soon as possible.
- When writing comments bear in mind why, when and what
- Be constructive and be nice. Find things in the code that you like.
- Be specific
-
Making changes
- Respond in a timely fashion
- Respond to comments
—
References: