DEV Community

Discussion on: Don’t comment your code

Collapse
 
nikolab profile image
Nikola Betica

Position Marker Comments are great for search purpose and visibility in minimap, but should be distinguishable from other comments.

Collapse
 
darkain profile image
Vincent Milum Jr

100% agreed on this. In my codebases, position market comments along with specific white-space above is a requirement for every function, so that way the minimap is easier to comprehend, and its quicker to jump to code. The style guide I use is based around human cognitive load of the code, infinitely more important than how the computer will process the code.

Collapse
 
nadaelokaily profile image
Nada Elokaily • Edited

I agree, position markers can be of great help when describing a block of functions or even a chunk of code.
But for each function I think rewriting its name surrounded with some slashes doesn't really add any value, I mean what do you think of this, is it really helping the code..

// Actions //////////////////////////////////
def Actions:
...

// Decompose //////////////////////////////////
def Decompose:
...
Enter fullscreen mode Exit fullscreen mode
Collapse
 
aarone4 profile image
Aaron Reese

Minimode placeholders should be in ASCIi art so they can be read in minimode