Integer conversions too pedantic in 64-bit

spir denis.spir at gmail.com
Tue Feb 15 14:50:02 PST 2011


On 02/15/2011 10:45 PM, Nick Sabalausky wrote:
> "Adam Ruppe"<destructionator at gmail.com>  wrote in message
> news:ije0gi$18vo$1 at digitalmars.com...
>> Sometimes I think we should troll the users a little and make
>> a release with names like so:
>>
>> alias size_t
>> TypeUsedForArraySizes_Indexes_AndOtherRelatedTasksThatNeedAnUnsignedMachineSizeWord;
>>
>> alias ptrdiff_t
>> TypeUsedForDifferencesBetweenPointers_ThatIs_ASignedMachineSizeWordAlsoUsableForOffsets;
>>
>> alias iota lazyRangeThatGoesFromStartToFinishByTheGivenStepAmount;
>>
>>
>> Cash money says everyone would be demanding an emergency release with
>> shorter names. We'd argue for months about it... and probably settle
>> back where we started.
>
> A small software company I once worked for, Main Sequence Technologies, had
> their heads so far up their asses it was trivial for me to get posted on
> TheDailyWTF's Code Snippet of the Day (This company had a
> rather...interesting...way of creating their "else" clauses).
>
> One of the many "Programming 101, Chapter 1" things they had a habit of
> screwing up was "Use meaningful variable names!". Throughout the codebase
> (VB6 - yea, that tells you a lot about their level of competence), there
> were variables like "aaa", "staaa", "bbb", "stbbb", "ccc", etc. Those are
> actual names they used. (I even found a file-loading function named "save".)
>
> Needless to say, trying to understand the twisted codebase enough to
> actually do anything with it was...well, you can imagine. So I would try to
> clean things up when I could, in large part just so I could actually keep it
> all straight in my own mind.
>
> Anyway, to bring this all back around to what you said above, there were
> times when I understood enough about a variable to know it wasn't relevant
> to whatever my main task was, and therefore didn't strictly need to go
> wasting even *more* time trying to figure out what the hell the variable
> actually did. So I ended up in the habit of just renaming those variables to
> things like:
>
> bbb
> ->
> thisVariableNeedsAMuchMoreMeaningfulNameThan_bbb

Did you actually type this yourself, Nick, or do you have a secret prototype of 
camel-case automaton, based on an English language lexing DFA?

denis
-- 
_________________
vita es estrany
spir.wikidot.com



More information about the Digitalmars-d mailing list