• MajorHavoc@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    There’s no such thing as self documenting code, unless every method and variable name has the word “because” in it.

    Anyone can read what the code does. The comments are there to answer why it does what it does the way it does.

    Why is invariably lost to time, if it’s not committed to a comment here and there.

    • fkn@lemmy.world
      link
      fedilink
      arrow-up
      0
      arrow-down
      1
      ·
      2 years ago

      This is a pretty ridiculous position to take but if you believe it then I’m glad you write the comments you do.

      There is an argument that commenting on the lack of expected code is valuable for this reason, but it certainly isn’t true in all situations.