4 ms·
"Never abbreviate a variable" is a very strong statement, surely inspiring religious wars. And maybe there are edge cases: i as a loop counter, id for an intege
by benkuykendall 10y ago
"Never abbreviate a variable" is a very strong statement, surely inspiring religious wars. And maybe there are edge cases: i as a loop counter, id for an integer primary key, whatever. But this example is something else entirely; "ttpfe" is honestly the worst variable name I have every seen.
- dgcoffman 10y agoAh, good ol' TransactionTemplatePayloadFactoryExtension.
- cbd1984 10y agoHistorically, i wasn't even an abbreviation: It was the first variable name which would be assumed to be integer by FORTRAN compilers which implicitly assigned types to variables based on name. The choice was probably further influenced by longstanding mathematical tradition, which uses i and j as indices. (You could declare types and the compiler would respect it, leading to the old truism "GOD is REAL, unless declared INTEGER".) (If you think that's the weirdest thing old FORTRAN did, look up the arithmetic IF statement sometime. Then, look up assigned GOTO.)
- ScottBurson 10y agoI think the weirdest thing old Fortran did was to let you pass a constant by reference to a subroutine, which could therefore change its value.
- Tiquor 10y agoPHP let's you change a constant in a subclass. Doesn't seem right.
- sengstrom 10y agoHave sufficient Hamming distance could be a better maxim!
- other_herbert 10y agoI've seen where the typing skill of the person implementing something will affect how verbose they are...