5
Tried using comments for every single line of code and it backfired hard
Last month I decided I was going to comment every line of my Python project so I could remember what everything did. I spent like 3 hours writing out things like "this adds 2 to x" on a 200 line script. When I came back to fix a bug 2 days later, I was so distracted by all the comments I couldn't even see the actual logic flow. Turned out 80% of my comments were just repeating what the code already said. Now I only use comments for weird decisions or math formulas I might forget. Has anyone else gotten burned by over-commenting their first project?
2 comments
Log in to join the discussion
Log In2 Comments
kai60226d ago
ditch the line by line stuff, only comment the weird parts now.
3
anna_carter5326d ago
Feeling you on this one, it's way easier to read.
3