I think it’s simpler than this: renaming it is a small upfront cost for gradual long-term benefit.
Yes, but at some point the cost starts to outweigh the benefit. Eg. going from yyyymmdd to currentDate is worthwhile, but going from currentDate to betterName, or from betterName to evenBetterName might not be worthwhile. And so I think you do end up having to ask yourself the question instead of assuming that all code quality improvements are worthwhile. Although I also think there’s wisdom in using heuristics rather than evaluating whether each and every case is worthwhile.
I agree with the big picture point that things that are sort of siloed off aren’t as important for code quality. I chose this example because I thought it would be easiest to discuss. However, although I don’t think they are as important, or even frequently important, I do think that stuff like local variable names end up often being important. I’m not sure what the right adjective is here, but I guess I can say I find it to be important enough where it’s worth paying attention to.
It’s a small upfront cost for gradual long-term benefit. Nothing in that says one necessarily outweighs the other. I don’t think there’s anything more to be had from this example beyond “hyperbolic discounting.”
Yes, but at some point the cost starts to outweigh the benefit. Eg. going from
yyyymmdd
tocurrentDate
is worthwhile, but going fromcurrentDate
tobetterName
, or frombetterName
toevenBetterName
might not be worthwhile. And so I think you do end up having to ask yourself the question instead of assuming that all code quality improvements are worthwhile. Although I also think there’s wisdom in using heuristics rather than evaluating whether each and every case is worthwhile.I agree with the big picture point that things that are sort of siloed off aren’t as important for code quality. I chose this example because I thought it would be easiest to discuss. However, although I don’t think they are as important, or even frequently important, I do think that stuff like local variable names end up often being important. I’m not sure what the right adjective is here, but I guess I can say I find it to be important enough where it’s worth paying attention to.
It’s a small upfront cost for gradual long-term benefit. Nothing in that says one necessarily outweighs the other. I don’t think there’s anything more to be had from this example beyond “hyperbolic discounting.”