loading...

re: Bad Programming Habits VIEW POST

FULL DISCUSSION
 

The "I don't like/hate comments" thing is typical and we'll, get over yourself. comments are context for other engineers and can be invaluable (as long as they too are professionally maintained).

 

Working with existing code feels like coming into a movie series half way through -- you have no idea who the characters are, and why they're doing that.

Some background really helps!

IMHO, comments should give context.

Ex.
"Looping through results" is pointless.
"Build array for export" tells you why.

 

Absolutely, a programmer won't appreciate the 'what' but they probably will appreciate the 'why'.

Sometimes I re-visit my code after a month and have no idea why I did what I did. And then I need to spend some time to understand what I was trying to solve and what kind of cases I had thought of...

Code of Conduct Report abuse