• @Aux
    link
    -128 days ago

    Hard disagree - that’s just dumb:

    // Calculates tax
    function calculateTax() { }
    
    • @[email protected]
      link
      fedilink
      10
      edit-2
      28 days ago

      Hard disagree - that’s very helpful:

      // Calculates Personal Income Tax by formula from section 1.2.3 of tax code. Other taxes like VAT are not calculated.
      function calculateTax() { }
      
      • @Aux
        link
        -428 days ago

        If it calculates personal income tax, just call calculatePersonalIncomeTax.

          • @Aux
            link
            027 days ago

            Add a flag.

          • @[email protected]
            link
            fedilink
            327 days ago

            I’m a new developer. Is that referring to page 123 of the in-house documentation? Version 12.3 of the code? I have no clue.

            You’d have to call it something like calculatePersonalIncomeTaxPerTaxCodeSection1_2_3, but I get exhausted just looking at that. There comes a point where the cognitive work of reading crazy long camel case names is more trouble than it’s worth.

            An explanation of what specification a function was written to implement is a perfectly appropriate comment. Could be improved by a direct link where possible. But it’s worth noting what that comment isn’t doing - specifying any implementation details. For that, I really can just read the code.

          • @Aux
            link
            127 days ago

            Yeah, why not?