4 ms·
If there is a comment is should be important enough to read it every single time you are near that area of code even if looking for something else in the file!
by bluGill 2y ago
If there is a comment is should be important enough to read it every single time you are near that area of code even if looking for something else in the file! They should be a reminder of something important and not obvious in the code - otherwise I'll just read the code.
Note that I distinguish comments from API documentation even though they are often both in the same code and use the same comment syntax.
- qrobit 2y agoIf there is something really important worth rereading over and over again, put «NOTE: » before it and let your editor highlight it for readers of your code