• deadbeef79000@lemmy.nz
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    11 months ago

    P1000x this.

    I can read a diff.

    I need to know why.

    No, a code comment isn’t good enough, it’s out of date after the next commit.

    • DontTakeMySky@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

      Code comments for "why"s that persist. Commits for why’s that are temporary.

      If you need to run X before Y, add a comment. If you added X before why because it was easier, leave it in a commit