HACKER Q&A
📣 tkiolp4

How to deal with subjective comments in code reviews


I’m an easy going person, that means if I suggest A and you suggest B (and A and B are functionally equivalent) I’ll go for B. I just don’t care to fight such battles.

Nevertheless, from time to time I do suggest A, and my peer suggests B, and even though both are functionally equivalent, I find the choice of B to be of “poor taste”. This is highly subjective, of course, so convincing others is rather a futile exercise. At the end, I tend to go with B, but I don’t like it.

How do you deal with such situations?

On the other side, I never ever leave code review comments that are subjective.


  👤 tomohawk Accepted Answer ✓
Just ask what the person's concern is, or what problem it is they're trying to solve. It's best to demonstrate the behavior you would like others to follow.

And if you have retrospectives or can talk to the lead, maybe raise the issue of these types of comments and how unproductive they are to see if new team guidance can get things on a better path. Perhaps bring in guidance about code reviews from a source people might give credence to such as google's review guidance.


👤 icedchai
Ask if it is high priority. If not, you tell them you disagree because A is already implemented, there are more critical issues, and you're running out of time. Offer to "open a Jira and address in a future sprint."