• @[email protected]
    link
    fedilink
    81 year ago

    Comments should almost always be reserved to “why” and not “what” or “how”. Give extra context that can not be brought in another way. The rest should be clear from the code

    • simple
      link
      fedilink
      71 year ago

      My “why” comments:

      // This is here because if I remove it, the whole server panics, no idea why. So don't delete it.
      
    • Deebster
      link
      fedilink
      English
      11 year ago

      I upvoted this, but actually I hardly ever see this style of commenting. Maybe it’s because I never got very far into corporate coding.

      • @[email protected]
        link
        fedilink
        English
        31 year ago

        At least in my experience it’s more people just stop leaving comments. Best place I worked had comment review as a part of code review, that was nice