3 ms·
I think I've seen far worse. For example, I saw some code where the variables were a, b, c, d, e, f... z, a1, b1, c1...z1, etc. Never underestimate the willing
by ojbyrne 15y ago
I think I've seen far worse. For example, I saw some code where the variables were a, b, c, d, e, f... z, a1, b1, c1...z1, etc.
Never underestimate the willingness of programmers to obfuscate in the name of (supposed) job security.
- bunderbunder 15y agoEven there, context matters. For example, lambdas in functional languages. In that case it's generally agreed that single-letter variable names are very much preferable to descriptive ones. For one, in the cases where lambdas are normally used, verbose naming can actually make the code harder to understand by disrupting the formatting of the code in which the lambda is embedded. Also, it creates a nice built-in code smell: If the lambda statement is complicated enough that its purpose is hard to understand without descriptive variable names, that's an indication you should be using a named procedure instead.
- Achshar 15y agomaybe it was from some kind of code minimizer? like gwt renames variable names to reduce file size when pushing for production.
- ojbyrne 15y agoThat would be a valid excuse. It was not the case.