I agree. I comment my own code pretty heavily, even when I’m the only person who reads it.
nderground
11

Our industry is into fad following, and once a few of the current greats decide something is bad, time to run in the other direction and eliminate it everywhere we can.

When I was taking Computer Science, they were still advocating needing pre and post condition comments and a paragraph on every function. I thought it was too much. Nowadays, we’ve largely moved that into tests.

I don’t think this current fad of basically having to justify having a comment is sensible either. Like most of these things where they go too far, they are often promoting some good ideas. While I think good variable and function naming can substantially reduce the need for comments, I’m not dogmatic about not using them.

Like what you read? Give Mark H a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.