0

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"

8
Contributors
9
Replies
10
Views
9 Years
Discussion Span
Last Post by William Hemsworth
0

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

0

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

0

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.

0

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.

0

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

if (something = 1)
{
   // do stuff
}
else
  //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 = != == .

0

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:

0

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

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.