DEV Community

Discussion on: What little things make you happy while coding?

Collapse
 
ethan profile image
Ethan Stewart

A lot of truth to this, but an exception can and should be made when something merits an explanation of why it is the way it is. Comments should be few and far between in well-written code, but still used when there's an actual need. For me that's usually just when I had to dig to find a way to make something work when a more intuitive solution wouldn't work in that specific case.

Thread Thread
 
gonzalezanguita profile image
Jose Tomas Gonzalez

Indeed, some business concerns are just impossible to explain by code itself and as you've said, logic that by some black magic doesn't work.
The key is to know if comments are up-to-date with the code as refactors come and go and not everyone updates the comments.

Thread Thread
 
ethan profile image
Ethan Stewart

With this I fully agree, that's something I've been trying to improve on myself.