[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: not enough real programmers?
seebs@plethora.net (Peter Seebach) writes:
>Luc Van der Veken <lucvdv@null.net> wrote:
>>ixOut = 0;
>>for(ixIn=0; ixIn < iSize; ixIn++)
>> if(InArray[iInIx]) OutArray[ixOut++] = InArray[ixIn];
>>return ixOut; // Return new used size
>>-------
>>for(i=j=0;i<n;i++)if(a1[i])a2[j++]=a1[i]; return j;
>>-------
>I would consider both to be "bad" code. I think the second is more trainable.
The second also has the large advantage of not failing during compile time ;-)
>People who litter their code with additional clutter are wasting a lot of
>time.
>PeopleNoun PNWho VerbLitter TheirAdjective NounCode PrepWith
^^^^^^^^^ Nope, possesive pronoun
>AdditionalAdjective ClutterNoun // note subordinate clause // AreVerb
>WastingGerund ArticleA LotNoun PrepOf NounTime.
^^^^^^ Nope, present participle
And I am not sure whether "Lot" is really a noun in that context.
And of course, you should standardize on one coding style --- prefix or
postfix ;-)
Bernie
--
He uses statistics as a drunken man uses lampposts --- for support
rather than illumination
Andrew Lang
Scottish man of letters, 1844-1912