R
Richard Bos
Tim Rentsch said:A couple of the names use abbreviations as part of the name (eg,
'fam_size'). I recommend using the whole word, and always avoiding
abbreviations.
I disagree. Even for normal abbreviations, not just for acronyms,
industry-standard abbrevs are probably more legible than the whole word.
I mean, my main program deals with entering data for advertisement. Can
you imagine how much larger and less legible my code would've been if
I'd used advertisement_width_in_columns everywhere I know have adv_cols?
void
Ew, ganoo style.
generate_random_derangement( unsigned a[], unsigned n ){
unsigned i, j, t, r, r_limit;
r_limit = RAND_MAX - RAND_MAX % n;
for( i = 0; i < n; i++ ) a = i;
Ew ew ew! You just proved that whitespace isn't _always_ good (and
whitespace on the _inside_ or parens rarely is). How about this more
moderate version:
for (i = 0; i < n; i++) a = i;
In fact, I'd prefer
for (i=0; i<n; i++) a=i;
But double spaces? Yuck.
Richard