DEV Community

Discussion on: Bad Programming Habits

Collapse
 
_garybell profile image
Gary Bell

Some code should be commented, for example any code which is very specific to a domain problem and appears counterintuitive.

Comments for the sake of comments - like "looping through array" - are annoying

Collapse
 
wildarg profile image
Pavel

Totally agree. I follow "Clean Code" by Robert Martin. If it needs to be commented, that means it's not clear enough

Thread Thread
 
mxldevs profile image
MxL Devs

Which can be a good thing of course, in case anyone reads this and thinks all good code must be self-explanatory.

"Code that is not clear" is not necessarily "bad code".