News for hackers. Stuff that matters.
Re:See what Hacker News looked like on the day you joined by jimmaswell on Sunday July 19, 2015 @02:02PM (#9912134)
I use long variable names all the time and it's never actually made the code harder to follow. You generally parse a whole word as a shape rather than one letter at a time anyway once you know the word, so effectively the only difference is a bit more horizontal space. If someone grew up using whole words as variables in math I doubt they'd find single characters easier to work with.

For programming, using characters not available on a standard QWERTY keyboard is bad international code shareability.

Re:See what Hacker News looked like on the day you joined by dilap on Sunday July 19, 2015 @02:29PM (#9912252)
I'll just say this definitely doesn't agree with my experience, though it's certainly the kind of thing that might differ from person to person, brain to brain.

Here's one thought experiment: imagine variables get longer and longer and longer. Clearly, at some point, they become so long that they're much more unwieldy to work with. Now it's just a question of, as they get shorter, when do the gains start to become insignificant?

(Re QWERTY: Ease of input is certainly a consideration, but hardly an insurmountable problem. We should not forever restrict ourselves to basic latin because that's what happens to be printed on many physical keyboards at this moment.)

Re:See what Hacker News looked like on the day you joined by jdavis703 on Sunday July 19, 2015 @04:15PM (#9912663)
In the kinds of jobs I've gotten, I spend more time reading code than writing code. As such long variable names are very helpful as I have less information I need to commit into my mental working memory.
Re:See what Hacker News looked like on the day you joined by McElroy on Sunday July 19, 2015 @05:57PM (#9912973)
Even when reading code you wrote yourself, long variable names can be immensely helpful.

I was working on some code today which I wrote a couple of months ago and came across some fields in a struct I had made, two of the fields were named like something_d_foo and something_d_bar (with something, foo and bar being strings which I've replaced in this comment). These names describe a relationship of something to foo and bar. When I read the name I had given it, I thought these were the somethings DISCONNECTED from their foos and bars but a comment I had written beside each of them informed me that they were the DEFAULT somethings of the foos and bars. I promptly renamed the fields as something_default_foo and something_default_bar.

Re:See what Hacker News looked like on the day you joined by dilap on Sunday July 19, 2015 @05:12PM (#9912839)
It's definitely a trade-off, that's why the idea of ideographic variables is so interesting.
Re:See what Hacker News looked like on the day you joined by vorg on Sunday July 19, 2015 @03:02PM (#9912399)
I doubt anyone can really parse grails.plugin.searchable.internal.compass.mapping.SearchableGrailsDomainClassCompassClassMapperFactory [1] as a shape.

[1] https://github.com/gpc/searchable/blob/master/src/java/grail...

Re:See what Hacker News looked like on the day you joined by thomasmarcelis on Sunday July 19, 2015 @04:58PM (#9912798)
It does say a lot about what it is
Re:See what Hacker News looked like on the day you joined by yoklov on Sunday July 19, 2015 @08:40PM (#9913456)
This is obviously code that solves a very real problem.
Re:See what Hacker News looked like on the day you joined by dilap on Sunday July 19, 2015 @03:34PM (#9912529)
😱
Re:See what Hacker News looked like on the day you joined by imh on Sunday July 19, 2015 @04:13PM (#9912651)
I think long names are relative. Jokes like these[1] don't come from a vacuum. I've seen serious code with sentence-long variable names before, and it does make it hard for me to read at a glance.

[1] https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...