by zumu · 8y ago · 0 comments
I wholeheartedly agree with the suggestions -- they are all great ways to be sensitive to your fellow coworkers, and I tend to favor this style. However, I know a lot of great developers who have a more direct style of communication. Also, I know several people who might interpret similar comments as patronizing or passive aggressive.
For example: "passing opinion as fact". And of course, calling these things "toxic". In fact, I disagree. Sometimes a little tough-love is needed, and this is the code we are talking about, not the person.
I'd suggest the author look up "egoless programming". Her suggestions seem to pander to ego-full programming, and this will mask underlying issues and allow them to fester, causing significantly greater problems in the future.
UPDATE: And of course, something unqualified is always an opinion (for a hilarious artistic rendition of this point, see the judge on The Good Wife who requires lawyers to append “in my opinion” to everything they say)
However, I much prefer it when people give me their raw and direct thoughts on the code. "indentation wrong", "really hard to follow this code", "why does this class exist?"; now we're two developers looking at code, and we both want it to be as neat as possible.
If I can tell that the reviewer goes out of their way to be diplomatic (e.g. by following the OP or by randomly praising code that is not broken), they're obviously worried about hurting me; and suddenly we are not managing my code, but me! Why? Am I on the brink of being fired? Did I ever overreact? Am I too attached to my source code? It also becomes impossible to tell how strongly the other side actually feels about their suggestions when everything is posed as a "what do you think" question.
It could be a cultural thing too? I'm German and American politeness often makes me paranoid because every flowery statement could be criticism in disguise.
I think the real negative that needs to be avoided is using code reviews to attempt to force people to do things exactly the way you would do them. I think many of the articles points kind of go towards this, but indirectly. Diversity of thought and approach is a good thing, and learning to live code that's not done in the fashion that I think is ideal was a lesson that took quite a while for me.
EDIT: And, to be clear, "Why does this class exist?" is a potential lead-in to such a problematic viewpoint. The problem happens when, after explanation of the class' existence, the response turns into, "You should remove this class." That's where it transitions away from knowledge transfer and into forceful monoculture of approach.
> It could be a cultural thing too? I'm German
No. I work with people all over the globe in open source. In my experience, humans everywhere appreciate helpful honesty.
(b) I am not going to break it down for you like that, because that would not be useful, missing the forest for the trees.
I think the whole approach of the article is mistaken and harmful, particularly stated as absolutely, "toxically" and without evidence as it is.
I've participated in code-reviews in roles as contributor, manager and mentor, with widely different teams in a variety of companies. The best teams that produced the best code were the ones that were the most "ruthless". Now of course: "hard on problems/code, soft on people", but with the first part being the priority.
Because the machine doesn't care about your feelings, and if you screwed up, you don't benefit from not being told that you screwed up.
And by tightly constraining the format to "helpful suggestion", you lose the range of feedback, from "awesome" via "yeah whatever" or "maybe try this" to "nope" and "what on earth were you thinking?".
Because it's important to not forget that the range always exists, compressing it into a lossy channel just muddles it.
Good teams have the rapport that makes the entire range of feedback possible and helpful. If that's not possible, it's an indication of a problem in the team. The more I am exposed to those sorts of teams, the more "toxic" I feel they are.
It also incorrectly shifts responsibility for negative feedback from the cause (the bad code) to the bearers of the bad news, and with it the burden for avoiding it. In order to avoid negative emotions due to negative feedback, don't police the feedback, write better code!
(Of course that assumes the feedback is roughly appropriate and proportional, a nuance that the article completely misses)
And once again, that has to be tempered with your role. As a manager, for example, it is important to take yourself back a bit, to let people code in their style even if you think you can do better (and particularly if you know you can). As a mentor, on the other hand, you are specifically there to help people grow, so comments at the level of "yes, you could do it this way, but I think this might be better" are more called for, because they are there as helpful guidance, without the implication of "you must do it or else" that goes with the formal power position (and will be understood that way even if you don't mean it).
And the most important part is fostering a team culture where there is a level of trust that feedback can be as harsh as necessary, where people actually want the toughest possible feedback. To create the best code and the best coders.
See also: The Coddling of the American Mind https://www.theatlantic.com/magazine/archive/2015/09/the-cod...
Directly saying what changes might improve the code, and why the code is better with those changes is direct communication.
I'll admit to being guilty of some of these on occasion; must do better.
I think the article is spot on, on just about every point. But one point I believe is missing is a discussion of "appropriate level of abstraction". This article has a terrific discussion on this point[1].
[1] https://dev.to/lpasqualis/the-5-problem-solving-skills-of-gr...