Each post must contain one bad programming practice to add to the list. I'll start:
In C++, overload library functions by using #define. That way it looks like you are using a familiar library function where in actuality you are using something totally different.
Name:
Anonymous2010-10-22 16:56
When comments are larger than the code. Perl is the only exception to this.
>>79
Thank you! Thank you so much! Oh god, I'm so unprepared. I'd just like to thank The Sussman, HMA meme fan, and of course my anus for all the love and support they've given me over the years. I love you all!
FUQUE, my [b][i]FIBONACCIBUTTSORT[o][/i][/b] algorithm is broken.
Name:
Anonymous2010-10-24 4:29
>>50
I was speaking of something like the following:
for x in elements:
for y in subelements:
...
Or perhaps:
x = y.method_call()
if x > z:
...
I wouldn't mind seeing them used as names for indexes in a C-style for loop. Another good place is in a language construct like a Python generator expression, where names are only used to describe how something should be generated in a single line. SQL aliases are also a good place for names of a very short length.
>>97
Funny, I tend to use i and j in for(;;) loops, but in foreach loops it's usually a (possibly abbreviated) singular form of the name of the array, i.e. for elem in elements.