▲ 1543 ▼ How programmers comment their code (lemmy.dbzer0.com) submitted 2 years ago by Andromxda@lemmy.dbzer0.com to c/programmer_humor@programming.dev 143 comments fedilink hide all child comments https://nitter.poast.org/denicmarko/status/1774077890281267451
[–] uis@lemm.ee 2 points 2 years ago (2 children) Why not calculatePersonalIncomeTax123 then? permalink fedilink source parent hideshow 4 child comments replies: [–] usernamefactory@lemmy.ca 3 points 2 years 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. permalink fedilink source parent [–] Aux@lemmy.world 1 point 2 years ago Yeah, why not? permalink fedilink source parent
[–] usernamefactory@lemmy.ca 3 points 2 years 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. permalink fedilink source parent