Ask HN: How to deal with refusal to change code during reviews?
11–20 of 34 posts
Re: Ask HN: How to deal with refusal to change code during reviews?
#12It's impossible to judge this situation without clear examples of code.
Re: Ask HN: How to deal with refusal to change code during reviews?
#13Fire him now, before he creates the minefield in your codebase. I mean, try to fix him first. But if he refuses to be fixed, fire him. He'll be toxic to the codebase, and he'll be toxic to the culture.
Re: Ask HN: How to deal with refusal to change code during reviews?
#14Write a clear guideline, and ask team to follow it. During the code review, you only ask to stick to guidelines (that everyone agreed on). This way programmers won't feel like your subjective opinion is affecting their work.
Re: Ask HN: How to deal with refusal to change code during reviews?
#15Reject it. I've done it a few times, there was a fuss, there was a discussion, it got sorted out. At the same time I've had a couple rejected (due to not adopting the reviewer's preferred code style). Same thing happened.
I agree. I would flat out say "I won't accept this change".
As a reviewer you're the gatekeeper, and no code is submitted unless the author and all reviewers are happy. Happy as in, if you approved the change and the author leaves tomorrow, you're the maintainer of that code. No one should be rude in the review, but the understanding needs to be that the power lies on the reviewer to hold their approval indefinitely until they're happy with the code. That's a cost for the author and costs almost nothing to the reviewer, so as an author you learn very fast to not waste time discussing whether something "is not important enough": You apply all suggestions you don't disagree with, and explain your disagreement about those that really matter.
Re: Ask HN: How to deal with refusal to change code during reviews?
#16It's not just about "you should code like that because that's how we code here" type of problems. That makes you, the arrogant person in the story. You should create a list of bugs generated by his code. If the list is significant AND if you believe these bugs could be avoided by incorporating %100 of your code review feedback, then setup a 1-1 quality meeting with him and go over the list. Tell him how this could be…
Re: Ask HN: How to deal with refusal to change code during reviews?
#17I've seen situations where someone with experience acted a certain way that sounded wrong - only to find out he was right all along. It's impossible to judge this situation without clear examples of code.
But the code review policy in OP's company looks weak: It's the onus of the author to convince the reviewer, not the other way around.
A good version of the first two responses could look like: "That would have a small impact because of X and Y, and it doesn't seem to me that the extra complexity in the code would be worth it". If the reviewer isn't convinced and you still don't agree, propose to open an issue to measure the actual impact, so the current change isn't blocked.
Re: Ask HN: How to deal with refusal to change code during reviews?
#18But one important note regarding ignorance: Is the incentive structure at your workplace such that programmers have the freedom to learn on company time? Or will they be dinged in a performance review because they haven't shipped features. If you value "getting it done right", you need to communicate that it's not going to come at your employees personal expense.
Re: Ask HN: How to deal with refusal to change code during reviews?
#19Write a clear guideline, and ask team to follow it. During the code review, you only ask to stick to guidelines (that everyone agreed on). This way programmers won't feel like your subjective opinion is affecting their work.
This is solving a people problem with a process. That doesn't work very well, in the long run.
So we can't tell which party is the problem, and what the issue is and we end up second guessing the person asking the question.
The advice invariably tends towards finding an objective standard so that the person asking the question can check that they aren't the problem person.
Re: Ask HN: How to deal with refusal to change code during reviews?
#20Try proposing some small experiments for the team to try over the course of a couple weeks that can pull your coworker into the team.