Curious to hear about the things that helped improve your programming ability.

    • Traister101@lemmy.today
      link
      fedilink
      arrow-up
      16
      ·
      edit-2
      1 year ago

      Always comment the why, not the what/how. Bonus of doing this is you only need to update the comments when the why changes

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

      Lol. That’s why we comment with “why”, rather than “what”. The answer to “what the duck where we even thinking?” usually doesn’t need updated until the commented code goes away.

    • Suppoze@beehaw.org
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      1 year ago

      Never understood this argument, it’s the person’s responsibility who changed the code to update the comments if needed. Otherwise they just implicitly admit that they did not read it or understand the context, or just plain did not care.

      • sebsch@discuss.tchncs.de
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        It just never works. Its important documentation breaks if changes are made. The best docs are baked into unittests