13
Told me to stop using so many comments in my code
A senior dev looked at my Python project last month and said "your comments are louder than your code." Hurt at first. But he was right. I was explaining every single line instead of writing code that spoke for itself. Now I focus on meaningful variable names and only comment the tricky logic. Anyone else get told to change a core habit like that?
3 comments
Log in to join the discussion
Log In3 Comments
charlescraig27d agoMost Upvoted
... but is it really that deep though? Like yeah, too many comments can clutter things up, but a few extra comments never killed anyone. I see people act like commenting is a sin now and that's just as bad. Sometimes that "tricky logic" isn't as clear as you think, especially six months later when you come back to it. I'd rather have one too many comments than waste an afternoon trying to remember what past me was thinking. The real problem is bad comments, not comments at all.
8
vera_lewis227d ago
@lewis.finley nailed it with the "ransom note" comparison. I used to do the same thing, commenting every boring line like someone would get lost. Now I only write comments when the code actually needs explaining.
1
lewis.finley27d ago
Oof, guilty as charged... my old code was basically a ransom note with explanations.
-2