• xmunk@sh.itjust.works
      link
      fedilink
      arrow-up
      18
      ·
      1 year ago

      The best explanation I’ve ever heard is:

      Comments should state the ‘Why’ never the ‘What’.

    • dukk@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      Yeah. Most of the time I use comments in my algorithms, as they often use some weird optimized black magic which are difficult to understand without comments.