3 ms·
Naming is hard. The name needs to be long enough to make the variable meaningful, but not longer. I have encountered a programmer (in the corporate space) who
by bruce511 3mo ago
Naming is hard. The name needs to be long enough to make the variable meaningful, but not longer.
I have encountered a programmer (in the corporate space) who bought into the "longer name" concept, to the point where he started complaining that the compiler had a 128 char limit for variable names.
For example instead of a variable called say "tax" he'd use something like "CustomerSalesTax". That was mostly bearable, but the context (and the fact it was the only tax field) made the extra description redundant.
That habit expanded though. Until he had names 50+ characters long. By then the code is illegible. Especially when the difference in variable names is minor. As in
TotalDepreciationAnnualisedInterimTaxValue
versus
TotalDepreciationAnnualisedInterimBookValue
So yeah, descriptive names good. Verbose names bad.