The Power of Positive Feedback in Code Reviews

How Encouraging Comments Can Boost Confidence and Elevate Code Quality

Recently, a team member left the comment above on my pull request. It brought to mind a similar comment from an engineer at my previous job—a person whose opinion I valued. He had said that my code read like a story and was great to review.

This experience reminded me of a valuable lesson I learned early in my career, one that I sometimes overlook but is crucial: the importance of leaving positive feedback in code reviews. It can make such a huge difference to the PR author.

This is especially true for larger pull requests or ones where the author may have faced significant challenges. A simple "nicely done" or acknowledging an elegant solution or praising well-chosen names for variables and functions can boost a developer's confidence and make their day—naming, as we all know, can be particularly tricky.

Many developers, including myself, find submitting code for review to be a vulnerable experience, especially since reviews often have no face-to-face interaction. As a reviewer, it’s easy to focus solely on what needs to be improved, filling a review with suggestions and change requests. However, remembering the effort that went into the code can transform the review process into a more positive and constructive experience. Especially for more junior engineers, a thumbs up or “neat solution!” can go a long way in building confidence and camaraderie. It’s a small reminder that we’re in this together and we all win by writing better code.

If you couldn’t tell already, the compliment made my day because code readability is something I not only value but have spent a lot of time thinking about. Having worked in startups where product directions frequently change, I've seen how vital it is that the code reflects current assumptions and product state. In my previous role I joked that our code base contained all the hopes and dreams of our startup. Good readability leads to better quality feedback during reviews, and makes it easier for reviewers to focus on higher-level issues. They spend less time and mental energy deciphering your code, variable names, and code organization. Instead, they can think about how the code fits into the larger system and consider more complex scenarios and edge cases.

Moreover, readable code is easier to maintain. A well written pull request provides an effective way to share context, ensuring that team members understand the changes and can contribute to that area of the code more effectively.

For a comprehensive guide to effective code reviews and best practices, I highly recommend Google's engineering practices documentation on code reviews. I've used it as a guide throughout my career because it's simple, to the point, and thorough. I’ve adapted it to help create code review best practices and guidelines at the last few companies I’ve worked at, and now at Nexel.

Remember, kind words can be a superpower in code review, I’m still talking about one comment many years later! Have you ever received a piece of positive feedback during a code review that had a significant impact on you? Or perhaps you have tips on how to give constructive, positive comments? I’d love to hear it! Share your stories and suggestions in the comments below.