Ask HN: How to deal with refusal to change code during reviews?
21–30 of 34 posts
Re: Ask HN: How to deal with refusal to change code during reviews?
#22Write 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.
Re: Ask HN: How to deal with refusal to change code during reviews?
#23It'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…
Also, "you should code like that because that's how we code here" isn't a good reason. If you don't have a good rationale for the changes, I would consider not making them.
In any group of "n" developers there are likely to be "n+m" different ways to do the same thing. This increases the "cognitive load" to understand others' code (a fancy way of saying it makes the code hard to understand).
Personal preference is not a valid reason to eschew standards, even (especially) de-facto ones.
If there is a "better" way to accomplish a particular task, then the entire team should adopt it (and go back and change existing code to conform to the "better" approach). If that's not worth doing, then leave well-enough alone. (Another way of saying "If it ain't broke, don't fix it").
Re: Ask HN: How to deal with refusal to change code during reviews?
#24Re: Ask HN: How to deal with refusal to change code during reviews?
#25And if you don't have skin in the game (ie, process just requires "someone" to review it even if not on the same team), then whatever, give them the advice and let them burn themselves if they wish.
Re: Ask HN: How to deal with refusal to change code during reviews?
#26Earlier quoted context omitted.
Also, "you should code like that because that's how we code here" isn't a good reason. If you don't have a good rationale for the changes, I would consider not making them.
On the contrary, that is a very good reason, and sometimes the only one that matters. In any group of "n" developers there are likely to be "n+m" different ways to do the same thing. This increases the "cognitive load" to understand others' code (a fancy way of saying it makes the code hard to understand). Personal preference is not a valid reason to eschew standards, even (especially) de-facto ones. If there is a "b…
Re: Ask HN: How to deal with refusal to change code during reviews?
#27Earlier quoted context omitted.
On the contrary, that is a very good reason, and sometimes the only one that matters. In any group of "n" developers there are likely to be "n+m" different ways to do the same thing. This increases the "cognitive load" to understand others' code (a fancy way of saying it makes the code hard to understand). Personal preference is not a valid reason to eschew standards, even (especially) de-facto ones. If there is a "b…
Right, but simply saying, "that's the way we do it here" doesn't communicate all that. Hence, "that's the way we do it here" is not a good reason. "That's the way we do it here, and here is why we do it like that..." is how it should be phrased.
Re: Ask HN: How to deal with refusal to change code during reviews?
#28Write 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.
Re: Ask HN: How to deal with refusal to change code during reviews?
#29If not, you shouldn't start a feud with a peer. It doesn't do anyone any favors. Get on with your job and let everyone else get on with theirs.
If so, decide whether the issues in question are really that important. If they aren't, cross them off the list of rules to follow. If they are, order him to do things the company way. If he refuses, fire him for insubordination.
Re: Ask HN: How to deal with refusal to change code during reviews?
#30Write 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.
Which is why if you have coding guidelines they should be enforced by automated tools. Either the code passes the tool or it doesn't, no on is allowed to nitpick brace placement, spacing, or whatever. Use something like clang-format or whatnot and stick to it.