Hacker News new | ask | show | jobs
by jkrubin 1831 days 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.
2 comments

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).

I use dividers like this because they're visible in the mini-map view that editors like sublime/vscode/atom have.