• bloubz@lemmygrad.ml
    link
    fedilink
    arrow-up
    7
    ·
    2 years 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@lemmy.mywire.org
      link
      fedilink
      arrow-up
      6
      ·
      2 years 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@lemmyrs.org
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 years 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.