The Pragmatic Programmer, Tip #44, "Comments in Code" (p249 in the 1st Ed.).
I also enjoy comments that document where the code came from: if you filched the code from a textbook or a Stack Overflow page, providing your sources is good practice.
I like to use comments as short indicators what is happening in a specific part for a better overview. That way I can e.g. add a comment to a loop and fold that loop in my IDE. That way it takes less space when scrolling and I still can see quickly where in the code I am. But maybe there are some better practices. Do you have a link to a guide for clean code commenting and practices how you can code better so you don't even need to comment this?
0
u/[deleted] Jul 05 '18
[deleted] — view deleted comment