DEV Community

loading...

Discussion on: 6 ways minimalism can help you write clean code

Collapse
theweeappshop profile image
Tony Ross

Disagree about commented code; but there's a time and a place for it. If you have the capability to minify your code, then comments have no place. However, in the overall readability/understandability of a large system, and to assist with debugging, comments are invaluable.

Great article though.

Collapse
paulasantamaria profile image
Paula Santamaría Author

I may have explained myself poorly on that point. I meant that commented-out code has no value. I'm in favor of comments that explain the purpose of code, as long as they add additional value.

Thread Thread
theweeappshop profile image
Tony Ross

Ah, my mis-understanding Paula. Totally agree with you then.

Thread Thread
moopet profile image
Ben Sinclair

Commented-out code may sometimes - very rarely - have value, but usually as a warning not to do something. Like in a function document string, something saying "this used to be done like so, but there's a gotcha, so don't refactor it back".