I’ve been going through the Unreal Engine C++ Developer course for GameDev.tv on Udemy, and there’s an odd recurring theme I’ve noticed among the three people who have instructed the course thus far (Ben, Mike, and Gavin) is that they have, at least once each, cautioned against creating comments. They each have said that the code should be self explanatory, and thus, should not require comment.
While I am not a professional coder and am not in any position to second guess this particular approach, I do find it odd that it runs exactly counter to what I have been taught from other industry veterans. According to them, you should never assume that code is self explanatory. After all, just because you understand it, doesn’t mean that someone else looking at it knows where you were going with it. Worse, when you look back on your code in a few months, it may similarly be opaque.
My question is this: Why is this course discouraging what I took to be a good coding habit? My knee jerk assumption for discouraging commenting is to avoid comment bloat in your code, but it seems like an overreaction to a smaller, edge case. Sort of like cutting your arm off to prevent a paper cut on your finger from becoming infected.