News for hackers. Stuff that matters.
Re:Is there an excuse for short variable names? by cryptoz on Saturday February 02, 2013 @04:30PM (#5157406)

    di[ctrl+space] = Math.Sq[ctrl+space](xD+[ctrl+space] 
...

    robo[ctrl+space][index].ohG[ctrl+space]
Every editor I've used in about 10 years has had an excellent autocomplete feature. I've never had to type out such long variable names.
Re:Is there an excuse for short variable names? by aroberge on Saturday February 02, 2013 @04:43PM (#5157462)
Physicist here. I never have to read such long variable names, which would make it much more difficult to spot bugs. I do undertand that long variable names have their place but, when it comes to programming numerical code which is a translation of actual equations, shorter names make it much easier to read and spot mistakes. I do wish that I could use a programming editor that could look like a TeX output on the screen though ...
Re:Is there an excuse for short variable names? by archgoon on Saturday February 02, 2013 @07:00PM (#5157888)
> I do wish that I could use a programming editor that could look like a TeX output on the screen though ...

This was one of the design goals of the Fortress project

http://labs.oracle.com/projects/plrg/Publications/fortress.1...

Scroll down to section 2.3 'Rendering'.

Sadly the project is now defunct.

Re:Is there an excuse for short variable names? by lutusp on Saturday February 02, 2013 @06:54PM (#5157869)
> I do wish that I could use a programming editor that could look like a TeX output on the screen though ...

For other readers (I suspect you already know this), Mathematica and Sage (and other environments) do a pretty good job of providing TeX-like feedback on what you've just typed in (but not keystroke-by-keystroke, which would be nice).

For those unfamiliar with Sage:

http://www.sagemath.org/

My Sage tutorial:

http://arachnoid.com/sage

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.
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. :-)