4 ms·
I was frantic code commenter in my youth because I wanted to give as much information to other people as possible but as I became SR developer I dropped them al
by hknmtt 4y ago
I was frantic code commenter in my youth because I wanted to give as much information to other people as possible but as I became SR developer I dropped them altogether. Especially after I moved into Go. Nowadays, I comment only in two situations:
1. if it is important to explain WHY something is done in a way it is done
2. if there is some related or directly connected code far away that the person might miss or cannot know about and how this code influences it. Writing self-explanatory code nowadays is a standard. An era of newbie spaghetti code is long gone so no need to explain the code itself.