Re:Useful and useless code comments
by jkrubin on Friday June 18, 2021 @12:19AM
(#27547322)
Something I don't see mentioned at all is what I call 'div comments' which are solely for chunk organizing. I use something like the following quite a bit (in python/bash):
Doesn't give any hints about the codebase but (at least to me) it lets me see related blocks.
[ Parent
| on HN ]
Sometimes a smell you should use multiple files or classes.
This is true, but sometimes it's not possible or awkward to do.
I find myself writing such separator comment blocks in userscripts quite a bit; and stylesheets where I do not have any tooling attached to it (e.g. mediawiki css).