One related overlapping problem is the need to also manage dimensions or units of measurement. That's the `_inches` suffix in the article's sample code. More precise, but still binds to legacy U.S. customary units in a mostly metric world. Having plain numeric values carry no units (nor dimensions, though that's more subtle) leads to ever so many errors. The loss of Mars Climate Orbiter, e.g., along heaps of money and hundreds of person-years invested. Wish dimensions and units were more fundamental to mainstream programming language computations. Until then, please consider using libraries that fill the gap such as Pint (Python), ruby-units (Ruby), unitmath (JavaScript/TypeScript), or uom (Rust).
I'll share one reason: long variable names can obscure the shape of otherwise concise code. When this happens, they occlude information at the whole-program or whole-function level, even as they add information at the variable level.
I like even better that be able to Call Things What They Are, you must first Know What They Are.
And if you have figured that out, you are close to being able to explain Why Things Are What They Are.
> I'll be honest with you, dear reader: I couldn't figure out the meanings of these variables by thinking through it on my own, nor by flipping through the book's pages. I had to go and ask Claude.
this is definitely learned helplessness. You do _not_ need claude to read a few lines of context and figure this out.
class Wheel
def diameter
rim + (tire * 2)
end
end
If you know what a diameter is, then this snippet contains all the information you need to understand what `rim` and `tire` most likely are; the missing information is units but those appear to be out of scope in this book example.The strong claim is that you don't end up with the same shape if you abstract out the long names at the end, because the shape of a program evolves with each bit that you add as you write it.
(Maybe all of this goes away once no one looks at code anymore, but we're not there yet, or at least I'm not.)
The problem is text editors!
I'm "yes, and"-ing your point about notational concision for what it's worth. Though I worry it's all a Scheme to get people to take APL more seriously.