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-22 16:56

When comments are larger than the code. Perl is the only exception to this.

Name: Anonymous 2010-10-22 17:13

h

Name: Anonymous 2010-10-22 17:13

a

Name: Anonymous 2010-10-22 17:13

x

Name: Anonymous 2010-10-22 17:14

m

Name: Anonymous 2010-10-22 17:14

y

Name: Anonymous 2010-10-22 17:14

a

Name: Anonymous 2010-10-22 17:14

n

Name: Anonymous 2010-10-22 17:14

u

Name: Anonymous 2010-10-22 17:14

s

Name: Anonymous 2010-10-22 18:17

[spoiler]EPIC WIN OP[/spoiler

Name: Anonymous 2010-10-22 19:00

>>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!

>>75

Name: Anonymous 2010-10-23 3:32

In memcpy() like functions, putting the source pointers before the destination pointers.

Name: Anonymous 2010-10-23 4:29

>>93
not bad[i]![/b]

Name: Anonymous 2010-10-23 5:05

[b]BBCode [i]failures[u][/i][/b]

Name: Anonymous 2010-10-23 5:07

FUQUE, my [b][i]FIBONACCI BUTT SORT[o][/i][/b] algorithm is broken.

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.

Name: Anonymous 2010-10-24 4:31

>>97
This is probably closer to what I mean.:


for x in elements:
    for y in x:
        ...


I do apologise.

Name: Anonymous 2010-10-24 4:58

>>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.

Name: Anonymous 2010-10-24 5:13

Oh, you poor non-nomadic people and you lack of [elem:elems] convention. :(

Name: Anonymous 2010-10-24 11:34

I once wrote a language where >> and << were the input and output operators.  Why the hell are people still using it?

Name: Anonymous 2010-10-24 18:22

>>101
Hello, Bjarne.

Name: Anonymous 2010-10-24 20:22

>>102
Hello Captain Obvious.

Name: Anonymous 2010-10-24 22:22

>>102
Hello, SUSSMAN

Name: Anonymous 2010-10-25 13:10

>>102-104
Hello, World.

Name: Anonymous 2010-10-25 22:59

>>105
Hello, opiates

Name: Anonymous 2010-10-25 23:01

>>106
Hello, Kitty.

Name: Anonymous 2010-10-25 23:07

>>107
Hello, anus

Name: Anonymous 2010-10-26 0:14

>>108
Hello, successfully derailed thread.

Name: Anonymous 2010-10-26 1:59

You have all been reported for being from Reddit.

Name: Anonymous 2010-12-06 10:03

Back to /b/, ``GNAA Faggot''

Name: Anonymous 2011-02-04 13:16


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