11
Update: got told to stop commenting my code so much, they were right
Been working on a little Python project for about 3 months now, mostly solo. I had comments on almost every line, thought it was super helpful. Then a buddy of mine from a local meetup in Portland looked at my repo and said 'you're just repeating what the code does, not why it does it.' At first I was kinda annoyed, but then I opened one of my older files and realized he was spot on. Half the comments were stuff like '# add 1 to i' which anyone can see. Now I only comment when there's a weird edge case or a decision that took me 20 minutes to figure out. My code is way cleaner and I actually understand it better now. Has anyone else had to unlearn the 'comment everything' habit from tutorials? How do you decide what's worth a comment vs just writing clearer variable names?
0 comments
Log in to join the discussion
Log In0 Comments
No comments yet
Be the first to share your thoughts on this discussion.