<< back

I have one rule for code review - never leave a comment unresolved.


I learned it from Chris, my friend and mentor back when I just started my first job.


One day I was working on some task and I just wanted to get it out of the door and call it a day. So I tried to rush through the code review in a very sneaky way - I didn't respond to some of the comments Chris left.


Of course Chris caught me and asked me why there were still comments unresolved. I made up some bulljive excuses saying I didn't notice them.


Chris was not buying it. He sat me down and said: "If people spend the effort and time to go through your code and leave you comments, at least acknowledge them and don't leave a comment unresolved. You have two options - fix it or reply why you did the way you did it." (apology for paraphrasing here because I don't remember the exact words Chris used).


It's a really simple rule and by doing it, you achieve two things


  1. Show the same respect other reviewers show to you. Sometimes acknowledging other people's time and effort is good enough.
  2. Retrospectively reason with yourself about the code you wrote when you push back a comment.

1 is about communicating and collaborating with people. I don't think I need to say much about it. 2 is about introspecting the understanding of your own work. If you can't elaborate your reasons, maybe you are just pattern matching your way through your work. And that's not good enough to make progress as a software engineer.

Never leave a comment unresolved - this one idea has served me well, and in my humble opinion, is a great rule of thumb for code review.