4 ms·
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 p
by jkrubin 5y ago
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.
- leetrout 5y agoSometimes a smell you should use multiple files or classes.
- fbcpck 5y agoThis 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).
- fake-name 5y agoI use dividers like this because they're visible in the mini-map view that editors like sublime/vscode/atom have.