The Empathetic Code Reviewer
Originally published on Typeshare
There is nothing more humiliating than publishing a code review only to receive nonconstructive feedback.
“Why didn’t you…”
“This is wrong…”
“This won’t work…”
These types of comments are toxic. Toxicity negatively impacts team morale and creates a hostile work environment. But there’s an antidote to counteract the toxicity. Empathy. Here are some ideas to help you become The Empathetic Code Reviewer:
Communicate Positive Intent⌗
Directives and criticisms produce one-way conversations. They make the author a passive participant in the conversation. Or worse, it could make the author defensive and spark a conflict. Instead use positive language. Positive language fosters two-way conversations. Using qualifiers such as “Do you think it would be possible if…” and “Under these circumstances, I think this might happen…” makes a huge difference.
Assume The Best⌗
Don’t be condescending. Avoid making comments that over-explain why their solution will not work. Assume the author is doing the best they can. If you’ve identified a skill gap, then be a leader. Leaders address skill gaps by taking up the difficult task of teaching. It’s best to teach using synchronous communication. So don’t hesitate to either meet in-person or hop on a video call.
Show Gratitude⌗
Did the author put a lot of effort into the code changes? Did they catch a bug that no one else did? Did they optimize the speed of the application? Whatever the author did make sure to say thanks. Be appreciative of their work. We put too much focus on finding the imperfections in the code that we forget to be grateful. But gratitude is one of the best motivators, and it doesn’t cost us anything. So why not say thank you?
References⌗
If you want to read more about code reviews. These are worth checking out:
- Code Reviews: Just Do It - Jeff Atwood
- Giving Better Code Reviews - Joel Kemp
- Good Code Reviews, Better Code Reviews - Gergely Orosz
- Code Complete 2 - Steve McConnell
- Code Reviews With Empathy - Rebecca Townsend
- Handling Code Reviews With Empathy - Will Barrett
Thanks for reading! Let me know what you think of this post on Twitter.