The scariest part of code review is hearing "Why did you do it this way?"

Among review comments, "Why did you do it this way here?" is the scariest. Even when I did it for a reason, if I can't explain it, it just makes it obvious I wrote it based on guesswork.

These days, I'm getting into the habit of writing down the reason in a comment before I write the code. That alone has drastically cut down the number of review comments.

by 주말개발자597

10 answers