Well, I think I've just had my worst programming gaffe. I write a 600 line program using linked lists and compile it. In addition to the usual missing ";" and "}", I continuously kept getting a "x not declared" error whenever I tried to access a variable from a pointer using the "-->". I start sifting through lines and lines of code to make sure that I hadnt done something silly and not declare the structures as global or something. After 3 hours of code sifting, repeated compilings and much internet surfing, I finally found the problem.

Now, wouldnt you say it is embarrassing for a programmer having used linked lists and pointers for about 1.5 years to have used "-->" instead of "->"???

P.S. I bet you didnt notice it either when I used it in the first para.

P.S.2 I bet you'll reply: "I totally saw it in the first para itself. MUAHAHAHAAA"

>Now, wouldnt you say it is embarrassing for a programmer having used linked
>lists and pointers for about 1.5 years to have used "-->" instead of "->"???
When I've been writing C and C++ for well over a decade and still type mian instead of main over 60% of the time, I'd say you have no cause for embarrassment. ;)

Now what is embarrassing is when you leave out a piece of code for development purposes (ex. not deleting a file so you don't have to constantly replace it) and then forget to add it before releasing a production version. Performance and behavior bug reports start flying in, and the bug is traced back to you. Yep, that's totally embarrassing.

ah lol. now that is as bad as mine. Now i can sit back and enjoy my beer without visions of shame playing in my mind. :p

Well use java. You won't get anymore pointer problems with java. Unless java does have pointers. Ya. I get confused sometimes when coding in differnet programming languages. Trying to use functions that are not there or variables the wrong way.

I put a print statement inside a loop instead of after it - the operator called me after he loaded the 2nd box of paper, sigh.

My favorite mistake in C/C++ used to be this:

if (something = 1)
   // do stuff
  //something else

And then be like "Why the hell is this always true??". If you had this problem a few times you'll never forget that = != == .

My worst day was when I once had not correctly handled a Database insert exception (instead of aborting, I was actually retrying sending the message)and I kid you not, it ended up sending 50000+ SMS messages for just one message ... sheesh . . . . . :@ :sweat:

Stepping through a MS-DOS based program in an IDE trying to find the source of a bug. Next thing: the computer did a warm boot, but was unable to come up again because it couldn't find a system drive.

After restoring from backup (and being very thankful I had a backup) an examination of the offending code revealed an invalid pointer operation that, it happened, executed the DOS interrupt for reformatting disk tracks......

lol at ^. made me laugh, it did ;)

I have made a few mistakes when programming, probably one of my worst, and I still can't quite remember how I did it, but I flooded the desktop with about 10,000 empty files while making a program that splits one file into many smaller ones. ;) Deleting them was even harder, I had to create a seperate program to delete each one (as you coulden't just select the files you want to delete as the icons went off the side of the monitor) :D