3 ms·
I could see going from "message" -> "msg" There are dozens of possible abbreviations for "message" but only one correct spelling of "message". Abbreviating a w
by mynameishere 18y ago
I could see going from "message" -> "msg"
There are dozens of possible abbreviations for "message" but only one correct spelling of "message". Abbreviating a word forces the reader to remember both what it is, and what its abbreviation is. One of the seldom-mentioned gifts that java has given the world is killing the horrendous C practice of insane abbreviations. I can't tell you how many times I've had to look up itoa(). It just wouldn't stay in my brain. But I guess it keeps my teletype's ink from running out too fast.
- AndyKelley 18y agoI think once you load the context of any given program into your head, the variable names become irrelevant. Programming on my TI-83 in elementary school, all I got was A-Z, but when I spent every class making a checkers game in TI-basic, I never forgot that C was the X-dimension of the current selection, Q was the number of black pieces left, and matrix [B] was the last saved game
- msluyter 18y agoWhile it's true that there are many abbreviations of "message," surely some are inherently easier to cognitively process than others. Compare: "eag", "sg", "msa" -- randomly chosen letters (in orig order) vs. "age", "meg","mag" -- purposefully misleading substrings, vs "msg", "mes", "mssg" -- closer to semantic content My point is not so much to quibble, but to suggest that we may have something to learn from cognitive psychology on the subject. Does anyone recall the recent study that showed taht as lnog as the fsrit and lsat lteters of wrods wree the smae, poplee culod gnerlaly mkae out the manenig? (whew! hard to type that.) This suggests to me that at the very least, retaining the first letter is important, and possibly the last as well. My qualm about single letter variable names is that they may require more "lookup time" (on average) because so much of the semantic content has been stripped from the name. I'm curious if anyone has actually researched this? I'm only theorizing here.
- ericb 18y agoI'd upvote you twice if I could. You don't even have to look at the screen if you follow a consistent rule of not abbreviating. If you do abbreviate, does your buddy use the same scheme? Consistently? Why optimize for typing speed when memory and "variable lookups" are the bottleneck?
- scott_s 18y agoI go for abbreviations that are pronounceable - but I do try to abbreviate. My soft rule is six characters or more. I understand your concern, but I consider horizontal space a resource. There's a point at which long names just add to the clutter and get in the way of the concepts.