Effective Code Reviews
Code reviews are an essential part of professional software development. When done properly, they greatly support quality and knowledge sharing. But how can we make sure code reviews are as effective as possible?
Below, I have summarized my personal experience with good and bad reviewing habits.
Good review practices:
- Reviewing one’s own code first before asking others to take a look.
- Taking enough time for a review and not rushing it.
- Focussing on asking questions and making suggestions.
- Giving compliments for changes that you consider well done.
- Offering a personal exchange for questions, discussions and knowledge-sharing.
- Keeping review sessions small (a few hundred lines max, below 1 hour).
Bad Review Practices:
- Not looking at the changes and just waving them through.
- Commanding changes with a top-down attitude.
- Blaming others for mistakes.
- Implying the author or reviewer is incompetent.
- Pressuring reviewers for fast approvals.
- Trying to cover huge change sets in a single review session (thousands of lines, above 1 hour).
In a nutshell, good reviewing practices are constructive. They encourage respectful communication and useful feedback. On the flip-side, bad reviewing practices are destructive. They harm code-quality and discourage future collaboration.
What do you think about these review suggestions? Is there anything you would add or change?
Note: You can also find this episode on YouTube and Spotify.
#CodeReview #SoftwareQuality #SoftwareEngineering