• gornius@lemmy.world
        link
        fedilink
        arrow-up
        9
        arrow-down
        1
        ·
        1 year ago

        General rule of thumb: Comments say why is it here, not what it does. Code itself should describe what it does.

    • Sylvartas@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      1 year ago

      But then you write code in the real world and find out that you have to write some ass backwards code every other day because of deadlines, backwards compatibility or whatever, and suddenly you realize that despite your best efforts, code cannot always be self documenting.

      Source: me.

      • Sylvartas@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        1 year ago

        In a vacuum, sure. On a real project of substantial size with more than one programmer, I’m afraid it quickly becomes a “cannot”