• pfm@scribe.disroot.org
    link
    fedilink
    arrow-up
    2
    ·
    3 months ago

    As mentioned in my other comment, names will rarely explain the reasons why a given solution was chosen. These reasons are important from maintenance perspective and should be recorded next to the relevant code.

    • magic_lobster_party@fedia.io
      link
      fedilink
      arrow-up
      2
      ·
      3 months ago

      I agree, and I count that as “key information that’s difficult to understand from the code”.

      IMO, comments should be used to provide value to the code. If they’re used too much, then readers of the code will more likely stop reading them altogether. They already got what they need from the code itself and the comments usually don’t add much value.

      If they’re sparse, then that’s a good indication they’re important and shouldn’t be missed.

      • pfm@scribe.disroot.org
        link
        fedilink
        arrow-up
        1
        ·
        3 months ago

        I definitely agree that too many comments is often a bad sign, esp. when large part of them is obviously generated.