Posts Tagged code review
Let’s talk about Code Reviews for a minute. They’re important; they spread knowledge around and catch bugs , but they can be frustrating some times. They don’t need to be though. There are a few things we can do to keep the code review a pleasant experience.
- Review the code, not the coder.
Keep it impersonal. Don’t use the words “you”, “your”, etc. Talk about the code. “This foo should handle this edge case.”, not “You forgot to handle this edge case.”
If you feel really compelled to use pronouns, always use “We”. It makes it clear that we both share the responsibility. “We need to handle this edge case here.”
- Don’t just point out flaws, offer improvements.
The most frustrating thing I run into is inactionable comments. “This foo is kind of ugly.” Yes. I know it’s ugly. It’s that way because I don’t know how to clean it up. We’re not learning via the Platonic method here. Please offer some suggestions on how we can clean it up. If I had known how, I would have likely already done so. If you don’t know either, offer to pair on it.
There you go, two quick tips for a better code review experience.
Until next time… Semper Cogitet