Sobes.tech
Middle+

How do you handle situations when you disagree with a code review assessment?

sobes.tech AI

Answer from AI

When disagreements arise regarding code review assessments, I follow this approach:

  1. Carefully review the reviewer's comment: I try to understand the main reason for their remark and the suggested improvement. I may have missed something or their perspective might be based on different experience.

  2. Analyze my position: I revisit my initial solution and justify why this particular approach was chosen. It's important to clearly articulate my arguments.

  3. Discuss the remark directly: Instead of passive disagreement, I initiate a discussion with the reviewer. This can be synchronous communication via messenger, a meeting, or a comment within the code review system. My goal is not to "win" the argument but to reach an optimal solution.

  4. Propose alternative solutions: If my solution is unsatisfactory, I am willing to consider other options suggested by the reviewer or collaboratively develop a new approach that considers both points of view.

  5. In case of necessity, involve a third party: If consensus is not reached after discussion, I may consult another team member or team lead for an independent opinion.

Example of a discussion in the code review system:

// My comment on the remark
// Hello! Thanks for the review. I understand your point regarding the use of this.findViewById.
// I chose this approach for performance reasons, as the View hierarchy here is small.
// Could you explain why, in this case, you suggest using ViewBinding?

An example of a discussion if the reviewer suggests an optimization that seems excessive:

I would present data in a tabular form, illustrating the impact of the proposed optimization on performance in this specific case versus the time spent implementing it.

Optimization Potential performance gain Implementation time
Original solution Base 0
Proposed optimization Minimal (about 1-2 ms) 1 hour

Ultimately, my main goal is to improve code quality and make it better, not just to defend my point of view. I am open to constructive criticism and ready to change my decision if convincing arguments are presented.