News for hackers. Stuff that matters.
Re:Should I Comment My Code? The Case Against Code Comments by zaphar on Thursday October 06, 2016 @09:32AM (#12652258)

    # NOTE(coderguy): Calling this method before calling
    # Init will result in a runtime error.
I use comments to make people aware of invariants the code expects that aren't necessarily obvious from reading that code.
Re:Should I Comment My Code? The Case Against Code Comments by tempodox on Thursday October 06, 2016 @09:41AM (#12652330)
If possible, document invariants as part of the code, not as a comment. Make it as hard as possible to misuse the thing. People not only don't read manuals, they also don't read comments. Which isn't to say you shouldn't comment your code.
Re:Should I Comment My Code? The Case Against Code Comments by aidos on Thursday October 06, 2016 @11:23AM (#12653234)
I wouldn't use a comment in that situation either - I don't think a comment hurts, but I'd rather the code failed in an obvious way if I tried to use it incorrectly.

My comments are generally along the lines of "so you're here because you need to change something? here's what you need to know", rather than "this is how you use this thing".