Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I disagree with this. Comments are important but not every time you're in that part of the code. You might already know from just the code what's going on, or have already checked out the comments. There's no value to them always being emphasized. That would be like reading all NPC dialogs every time in an RPG.


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.


If 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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: