Re:Is there an excuse for short variable names?
by Turing_Machine on Saturday February 02, 2013 @04:40PM
(#5157447)
Reading is arguably more important than typing. Being able to fit more code on the screen has its advantages, too.
[ Parent
| on HN ]
Re:Is there an excuse for short variable names?
by GhotiFish on Saturday February 02, 2013 @04:52PM
(#5157503)
Even in the age of 1080p I agree with you. Side by side code samples, or having documentation up next to code, is very useful. However, if super verbosity pushes your code width to 120 characters, the screen real-estate needed is too much.
Re:Is there an excuse for short variable names?
by Turing_Machine on Saturday February 02, 2013 @05:07PM
(#5157568)
Something like thing.horizontalPositionInTransformedAndScaledUnits may be slightly clearer the first time but becomes counterproductive when there are 20 of them on the same screen, especially if there are 20 thing.verticalPositionInTransformedAndScaledUnits mixed in.
Your eyes just start to glaze over (or at least mine do).
If you're only ever using one coordinate system, just use thing.x and thing.y or thing.h and thing.v, maybe with a comment that explains that these are in transformed and scaled units. Your eyes will thank you. :-)