4 ms·
A long time ago I picked up the habit of "coding in commented paragraphs": https://www.perl.com/pub/2005/07/14/bestpractices.html/#7-code-in-commented-paragrap
by rectang 2y ago
A long time ago I picked up the habit of "coding in commented paragraphs":
https://www.perl.com/pub/2005/07/14/bestpractices.html/#7-code-in-commented-paragraphs https://www.perl.com/pub/2005/07/14/bestpractices.html/#7-co...
This style allows me to scan only natural language comments, generally rendered in a distinct highlight color, to get a high-level view of what the code does. My colleagues have rarely followed the same idiom, but my code has been well-regarded everywhere I've been.
When you do this, there are occasionally times where you wind up with a single line that isn't grouped with the others, and to be consistent the easiest thing is to insert a comment like the one that started this thread.
However, I've adapted this style over the years to avoid any hint of redundancy because some people feel so strongly that they will fixate on it and decide you're a terrible engineer for this one tiny detail. It's easier just to work around them.