Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Bad Programming Practices

Name: Anonymous 2010-10-19 0:35

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: Anonymous 2010-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.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List