I am struggling with a coworker who provides heavy criticism during code reviews, to the point of turning them into arguments about "who knows more" instead of keeping them focused and helpful.
Sometimes he provides useful feedback. For example, he pointed out that when I write my code comments in English, they are hard to understand - instead, he tells me to write them in my native language. Ok, I agree with that.
But, he also once told me that it is bad to create a new function when I use it only once - I did not agree with that, and I felt like he was just trying to start an argument. I provided him with an example where a high profile, widely respected developer had done that, and his response was "you read any guy on the internet and believe what he tells?" I said no. He also said, "you just found that to show you are right."
Whenever he is reviewing my code, and I do not have a good argument - it is a bad situation, because he says, "that's not a good argument." Yet, when I find a reasonable argument, he still attacks me and tries to disprove me. My question is, what can I do to help us have a helpful code review instead of turning it into an argument? When it turns into an argument, I feel badly. I'd like to get good feedback, but ultimately, I don't want to feel bad afterwards.
Some solutions I have considered are,
Should I not respond to him at all? I do that often. But when I do that, I feel anger and other bad emotions. It happens when somebody tells me something bad about me without a good argument proving to me that this is real and not just their thought.
Should I just change my job?. But I believe that in almost every good job, there will be people who try to show you that you are bad when actually, you are not bad at your job, at least in that certain situation.
Should I ask him not to insult me? But that just makes me look weak, like "poor boy here is not able to take revenge so he just asks us to not attack him."
The whole situation reminds me of a game. For example, in a game we fight against each other, and winning is sweat. And in a game we are not asking politely - do not do this or that, because I will hardly win then. I feel like, in a code review, we should be polite, instead of treating it like a game that we're trying to win at all costs.
Instead, he is turning the code review into a game, but the game is not a computer game or a sports game - it is an argument game, a knowledge game. Who is better at code. Imo.