News for hackers. Stuff that matters.
Re:Is there an excuse for short variable names? by btilly on Saturday February 02, 2013 @05:39PM (#5157683)
You mean a comment header like http://futureboy.us/frinkdata/units.txt? No matter how clear and detailed, there comes a point when nobody is likely to remember much of it. (And that would be an exemplary example of clarity. Read it if you don't believe me.)

There is an upper limit to how much state we can stuff into our head. We can memorize things for longer. But unless we will amortize that state over many, many uses, the effort is not worthwhile.

That said, if we have taken the effort to memorize it, there is no reason not to leverage the already spent effort.

Re:Is there an excuse for short variable names? by lutusp on Saturday February 02, 2013 @06:45PM (#5157854)
> You mean a comment header like http://futureboy.us/frinkdata/units.txt? No matter how clear and detailed, there comes a point when nobody is likely to remember much of it.

Yes, but I'm not sure that's a very good example. There's a lot going on there -- things not really soluble using multiple-character variables.

> There is an upper limit to how much state we can stuff into our head.

Yep. It's why we have computers. :)

In case that seemed flip, consider this -- if I want to verify that I am using some program variable X in a consistent way, all I need to do is globally search for it and evaluate each case. Modern programming editors will happily list every instance of that variable's use, so I can make sure I'm being consistent. In such a case, a multiple-character variable would likely tend to obscure the issue and complicate the search.