Notes
“Why didn’t you just…” is a phrase I’ve worked very hard to eliminate
from code reviews, for the benefit of others. For those of us with loud
inner critics, having it written to you in a review can imply:
- You didn’t think through the problem well enough. That may be 100%
true, and the point of code reviews is to think through the problem
more with help from others, but now I think you think I’m an idiot,
and what could be a learning or teaching moment has made me a bit
less receptive to the information.
- You should have known better not to do that. Maybe I had looked
into
snakey
and decided not to use it. Or that was a new thing in
snakey
and my knowledge of the library is out of date. In this case,
a code example going along with the comment is a huge help.
Show me what you’re thinking by writing some code, and it could
help massage even a straight “Why don’t you just…” in a great
“A-ha!” moment for one or both of you.
Remember, rogerf really thinks Bamboo will find these improvements useful.
They’re not being a jerk within the rich fiction of this comic. But that
doesn’t mean anything when an inner critic gets involved.
Additionally, rogerf was probably trying to soften the blow and make
Bamboo feel less upset. In code reviews specifically, this is where a
code example, provided within the comment and without making someone
ask for it, can be much more effective.
“What do you think about” is a phrase I’ll often use in these contexts,
because if they had thought about it, then cool, you already know!
If not, cool, now we’ve both thought about it and we can discuss it!
There’s a lot of other ways the word “just” can be used, and there’s
discussions online about how trying to govern the use of this word,
especially in the workplace, could be damaging. In the context of code
reviews specifically, my own experiences and conversations have shown that
there are much better alternatives than the word “just”, and they trigger inner
critics a lot less quickly.
Transcript
Bamboo receives a code review comment notification
Reviewed by rogerf_:I think you’ll find these improvements useful!
rogerf_: Why didn’t you just use the function from snakey instead of
reimplementing it here?
“Inner Critic”: Why didn’t you just do it right the first time, Bamboo? Why did you just
waste their time on your crappy code, Bamboo? Why didn’t you just do the
research, Bamboo? Why did you just show everyone how bad a developer
you are, Bamboo?