• SlopppyEngineer@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    Best comment ever was “It used to work like this but person at client demanded it work like that on this date” when the client complained it shouldn’t work like that.

    • conciselyverbose@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      That’s basically what comments are most useful for. When you’re doing something that’s not obvious, and want to make sure the “why” doesn’t get lost to time.

    • T. Hex@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      The best comments are “why” comments, the runner up is “how” comments if high-level enough, and maybe just don’t write “what” comments at all because everyone reading your code knows how to read code.