| | |
Worst Programming Gaffes
![]() |
•
•
Join Date: Aug 2008
Posts: 18
Reputation:
Solved Threads: 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"
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.
>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.
In case you were wondering, yes, I do hate you.
My favorite mistake in C/C++ used to be this:
And then be like "Why the hell is this always true??". If you had this problem a few times you'll never forget that = != == .
if (something = 1)
{
// do stuff
}
else
//something elseAnd 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 . . . . .
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
"How to ask questions the smart way ?"
"How to ask questions the smart way ?"
•
•
Join Date: Aug 2008
Posts: 206
Reputation:
Solved Threads: 31
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......
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......
•
•
Join Date: Mar 2008
Posts: 1,522
Reputation:
Solved Threads: 127
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)
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)
![]() |
Other Threads in the Geeks' Lounge Forum
- Previous Thread: DaniWeb World Community Grid
- Next Thread: Google Chrome
Views: 808 | Replies: 9
| Thread Tools | Search this Thread |
Tag cloud for Geeks' Lounge
2010 ads advice anime ascii bankrupt bankruptcy bear beard books change clocks closed code cognitive_disorder comedy convert cracked.com crackpot daniweb design disk dogs empty flaw fun garbage gifts google happiness hunting idiocy india information java king knife language larnyx library life linux lynx machine mad magic manly marketing mars medical medicalresearch microsoft moderator ms murder networking odf office operating origin os outlook pain power preview processing programming python republic research santa school security software source space spring starteam subversion systems tech text thing time unsolved unused username vapid virus viruses wakoopa wave windows windows>all windows_wins wolframalpha world www xmas zomg_conspiracy






