The worst coding/programming mistake you've ever made?

GregRedd

New member
I'm neither a coder or progammer. I can find my way around some html and basic php strings, and can run a couple of commands in a command prompt window.

Worst things I've ever managed is wrecking my F1 stats database with an ill-advised attempt to insert data directly into the sql tables. (a problem I'm still working on restoring over a year later :( )

I also once ran a format drive: command on the wrong drive and landed up trashing the C: drive on my wife's old laptop. Fortunately I had backuped all her docs and pictures to an external, else she probably wouldn't still be my wife.

That said, I know there are a number of MyG-ers who are involved in working with significantly higher level databases and equipment. And also in light of the recent "Man accidentally 'deletes his entire company' with one line of bad code" story (which turned out to be nothing more than a silly low effort guerilla marketing effort) I was wondering if anyone in these parts has a similar story of data devastation that they may have caused, whether personal or professional?
 
I have plenty, I remember most of them, I now call it experience.

I omitted some basic checks on a SQL statement to prevent SQL Injection attacks, and also skimmed over constructive arguments for database manipulation. The result was that I left a "if <fieldname> = null then fieldname = "*""; Which meant that in the "admin" panel if you went to delete a user account and accidentally clicked the "delete" button without entering a username it would build a SQL statement to the likes of : DELETE FROM tbl_users WHERE username = *

Luckily I could catch that quickly. More recently it was a resource management thing where I just ran out of filedescriptors (FDs) by underestimating the number of FDs the code would generate for each TCP connection. Turns out it's 1 FD for the control process, 1 FD for the data stream return to the user that fires once and stays open until the control proccess closes and 5 minutes later it will die, 1 for each query per user to the server. So very quickly 200 odd users would use up ~2000 FDs, except it was more like 1500 users and the FD hard limit was set to 4096 and not 16384 which is what I needed. Well that's fixed now.
 
As far as I remember, the worst I've ever done while coding is cause my machine to BSOD, or lock it up entirely by running a search through a massive tree.

The worst I've done with a single line was a running C:\>del *.* when I meant to be on A:\>, back in the day. I wasn't allowed to use that person's computer ever again.

Incidentally, it turns out that the "delete whole company with a single line of code via Ansible" story was a hoax.
 
Many years ago I was working on a interface between a client and medical aid switch. Basically the client system requests payment for certain patient procedures from the medical aids via my interface. Just before release I commented out the part of the code which checked the rejection status of the claim. I forgot to enable the check again and this passed through QA and ended up on the client system.

Fast forward as month down the line, the client freaks out because almost 1.5mil worth of claims are not paid yet. I can't describe the feeling of when you go through the code and realize is your fault. Luckily the claims were not staler at that point in time.
 
Worst for me, I guess (Not coding):

Took a bet that MS Windows Small Business Server 2003 was not that stupid that you could just Shift+Del the Exchange store - reckoning that it must return an error. To proof my point, I hit Shift+Del and it asked if I am sure and I confirmed. It deleted the Exchange store for an office of 48 users!
 
My worst programming mistake was when I added some functionality to a website but wasn't able to complete it because I had to do other more important work. Unfortunately the half completed bit went out into the wild because I forgot about it and I never disabled it. This ended up in some data that was wrong and only caught a couple of months later.

Sigh.

I sure learned from that.
 
Not anything fancy but I made an ilogic(runs on vb) model in Inventor for quoting purposes. I referenced an incorrect hopper design in and for a few months we were sending out quotes that were 1 ton out.
 
Commented some lines of code out while testing and I ended with a while(true) in a FileOutputStream. Caused the testing server to run out of space while I was out on lunch :P
 
Not anything fancy but I made an ilogic(runs on vb) model in Inventor for quoting purposes. I referenced an incorrect hopper design in and for a few months we were sending out quotes that were 1 ton out.

Damn hoppers.

kangaroo1.jpg
 
well, I don't know if it really counts as a coding mistake...

But at my old old company I was in charge of creating everybody's HTML Outlook signatures. Basic stuff. Some embeded images and the standard "Kind Regards John Doe" with contact details. Now I of course use one master template that I just change name and info on per individual.

Now, the "t" and the "g" keys are very close together. And I, nor anybody else, didn't notice my little typo in "Kind Regards" for a week and a bit...
 
well, I don't know if it really counts as a coding mistake...

But at my old old company I was in charge of creating everybody's HTML Outlook signatures. Basic stuff. Some embeded images and the standard "Kind Regards John Doe" with contact details. Now I of course use one master template that I just change name and info on per individual.

Now, the "t" and the "g" keys are very close together. And I, nor anybody else, didn't notice my little typo in "Kind Regards" for a week and a bit...

Ha ha ha...'Kind Retards'
 
Accidentally sent out 9500 emails with the text string: "<h1>I hope this flipping thing works now</h1>". Not my finest moment.
 
This is not the worst coding mistake, nor is it a story about me, but more en employee of mine. As part of her development, I've started giving her more responsibility when it comes to the management and development of our Qlikview Dashboards. That way, it free's up my time to spend on the myriad of other projects I have to deal with.

Well, not even 30 minutes ago, she sent me an email. The dashboard she created wasn't working properly, and I gave her extension on deadline to this morning to finish it. She worked until late hours yesterday, and even through the weekend to find the issue, but she was struggling. Now, 30 minutes ago, her email stated that the issue was an "S" incorrectly added to one line of code. Hahahahaha. I believe anyone that's ever done any coding of some sort would know this type of errors. Like I said, it's not business braking, but thought was share-worthy.
 
I remember I did a map on an old client's website. I named it map.php, since the live version was map.php3. I didn't put any text on the button, so to make it a little bigger to click on, I put "Small buttons suck".

The main dev decided one day to drop .php3 file extensions in favour of .php, so the map didn't get ported, and the test file went live along with 'small buttons suck'.

I'm sure if I think hard enough, I'll have something much worse than that...
 
Back
Top