What's the stupidest mistake you ever made?
Ah, the old favourite 'last minute hack' bit me once or twice, too.
Back in the old days I worked for a major UK high street bank, programming PL/I to keep the cashpoint network up & running. We had a new release going out, it was Friday, 5pm, the deadline for the release was 5:30, and we'd spotted a bug. Easy fix, too, a simple logic error.
So, fire up the file in question in the TSO editor, 'fold' out the bits we're not interested in, change the bits we are interested in. unfold the file back to original state. Hit the wrong key and instead delete all folded code. Fail to notice. Compile code. By pure luck, it compiles cleanly (we never bothered looking at the warnings, all of the code warned). Release code with 5 minutes to spare.
Casually stroll into work Monday morning after a weekend getting pissed, wonder why the boss is there at 6am and looking stressed... Turns out the 'edited' code has trashed > 50% of the cashpoint configuration database, meaning that > 20% of the UK's cashpoints failed to restart after the release, and were down all weekend.
Simon
Back in the old days I worked for a major UK high street bank, programming PL/I to keep the cashpoint network up & running. We had a new release going out, it was Friday, 5pm, the deadline for the release was 5:30, and we'd spotted a bug. Easy fix, too, a simple logic error.
So, fire up the file in question in the TSO editor, 'fold' out the bits we're not interested in, change the bits we are interested in. unfold the file back to original state. Hit the wrong key and instead delete all folded code. Fail to notice. Compile code. By pure luck, it compiles cleanly (we never bothered looking at the warnings, all of the code warned). Release code with 5 minutes to spare.
Casually stroll into work Monday morning after a weekend getting pissed, wonder why the boss is there at 6am and looking stressed... Turns out the 'edited' code has trashed > 50% of the cashpoint configuration database, meaning that > 20% of the UK's cashpoints failed to restart after the release, and were down all weekend.
Simon
Is that why you live in the French Alps now then?tufty wrote:Casually stroll into work Monday morning after a weekend getting pissed, wonder why the boss is there at 6am and looking stressed... Turns out the 'edited' code has trashed > 50% of the cashpoint configuration database, meaning that > 20% of the UK's cashpoints failed to restart after the release, and were down all weekend.
- spinlizard
- Baaaaa!

- Posts: 1612
- Joined: Mon Dec 09, 2002 10:09 pm 0
- Location: Somewhere cosy
Becoming a programmer...
My most devastating errors were back in the days when we used to do all code changes on the live server
We had a billing system that revolved around a table containing all the customer information. I needed to clean out some old redundant data that had been archived off so I nipped in with a quick "DELETE FROM tbl_customers WHERE cArchived = 'Y'". Problem was, when I highlighted the SQL and executed it, I missed off the WHERE clause.
One resonatingly empty customers table resulted.
Data was restored within 30 mins but not before the helpdesk got swamped with calls.
My most devastating errors were back in the days when we used to do all code changes on the live server
We had a billing system that revolved around a table containing all the customer information. I needed to clean out some old redundant data that had been archived off so I nipped in with a quick "DELETE FROM tbl_customers WHERE cArchived = 'Y'". Problem was, when I highlighted the SQL and executed it, I missed off the WHERE clause.
One resonatingly empty customers table resulted.
Data was restored within 30 mins but not before the helpdesk got swamped with calls.
- moobaa
- Sheepie Whore

- Posts: 16118
- Joined: Sun Sep 29, 2002 8:08 am 0
- XBL Gamertag: petee moobaa
- PSN: moobaa
- Location: Sydney, Australia
Re: My most terrible error
russel wrote:Have Voted for W
- Dvorak
- Baaaaaa!

- Posts: 4560
- Joined: Wed May 08, 2002 7:37 am 0
- Yahoo Messenger: d3dxquaternion
- Location: Germany
Re: My most terrible error
Now, that's most stupid indeed.russel wrote:Have Voted for W
>take off sunglasses
Seamen and fishermen alike swear to have heard voices in the rising tide. Inhuman screams, some of them say.
Seamen and fishermen alike swear to have heard voices in the rising tide. Inhuman screams, some of them say.
- hairy_pete
- Baaaaaaa!

- Posts: 7217
- Joined: Mon May 27, 2002 8:10 pm 0
- Location: A Tiny Village in Bavaria
Not mine:
Padding bank account numbers with trailing zeroes.
German Bundesanstalt für Arbeit (Employment Agency) just managed to do that in the process of sending the long-term unemployed their January money.
Banks soon wondered why they had tens of thousands of money orders piling up in their "unknown target" accounts ...
Padding bank account numbers with trailing zeroes.
German Bundesanstalt für Arbeit (Employment Agency) just managed to do that in the process of sending the long-term unemployed their January money.
Banks soon wondered why they had tens of thousands of money orders piling up in their "unknown target" accounts ...
Wow, I misread that as "padding bank account balances with trailing zeroes" for a second then!hairy_pete wrote:Not mine:
Padding bank account numbers with trailing zeroes.
German Bundesanstalt für Arbeit (Employment Agency) just managed to do that in the process of sending the long-term unemployed their January money.
Banks soon wondered why they had tens of thousands of money orders piling up in their "unknown target" accounts ...
Nor mine either - remebered from some long ago post about being careful with coding...
A new online banking system needed a filter for usernames (swear words, famous people, etc.), so one was dutifully coded. The input was a text file, the format being:
'restricted word'
'response to be printed out'
etc.
However, when it went live, someone mistakenly added a newline at the top. This meant that whatever username you typed in, the strcmp succeded to match it with the blank line, and print out the 'response. A little dialogue box popped up that simply said 'Fuck'
A new online banking system needed a filter for usernames (swear words, famous people, etc.), so one was dutifully coded. The input was a text file, the format being:
'restricted word'
'response to be printed out'
etc.
However, when it went live, someone mistakenly added a newline at the top. This meant that whatever username you typed in, the strcmp succeded to match it with the blank line, and print out the 'response. A little dialogue box popped up that simply said 'Fuck'
When I was coding a MUD, I put a swear filter in to stop people shouting offensive words... (mostly becuase the guy who was hosting the mud didn't like it)... I told him that it probably wouldn't work, and people would find a way round it, but he insisted...
So I came up with the rules that 1 strike was a warning, 2 strikes was a silencing till you found an immortal to remove it from you...
And he came up with his list of "unacceptable" words, I dumped it in the right directory, did a warm reboot and went down the pub...
Unfortunately, the word "ass" was in the banlist, and when I got back to work, I found 30 or 40 assassins unable to speak (and pissed off), and everyone else saying "F*U*C*K" on the public channels...

Thinking of it now, I kinda miss MUD coding...
So I came up with the rules that 1 strike was a warning, 2 strikes was a silencing till you found an immortal to remove it from you...
And he came up with his list of "unacceptable" words, I dumped it in the right directory, did a warm reboot and went down the pub...
Unfortunately, the word "ass" was in the banlist, and when I got back to work, I found 30 or 40 assassins unable to speak (and pissed off), and everyone else saying "F*U*C*K" on the public channels...
Thinking of it now, I kinda miss MUD coding...
"What's there to lose?" said the general, selling our dead meat by the pound...
where to start, there are so many.
1) editting cronjobs on a production server
and enter crontab -r then went argh! Why place the remove (-r)
switch so close to the edit (-e) switch! Luckly we have backups ...
2) Making a copy of Ingres production database, which involves db generated export/import scripts, and many table files. Did a prod export, failed to change an import script and started to import data back into our production database instead of the test database (ARGH!). After around 32 stuffed tables (duplicate rows), I had the drop them in production and rebuild them again from the exported tables. So it wasn't a complete stuff-up, but very close.
3) Here's a common one, edit a production script (Warning) because of some error that needed to be fixed pronto and test it, and it works. But fail to make changes in the test script. New changes to script and done in test and then copied into production and you then here .... why doesnt xyz work anymore ARGH!
1) editting cronjobs on a production server
and enter crontab -r then went argh! Why place the remove (-r)
switch so close to the edit (-e) switch! Luckly we have backups ...
2) Making a copy of Ingres production database, which involves db generated export/import scripts, and many table files. Did a prod export, failed to change an import script and started to import data back into our production database instead of the test database (ARGH!). After around 32 stuffed tables (duplicate rows), I had the drop them in production and rebuild them again from the exported tables. So it wasn't a complete stuff-up, but very close.
3) Here's a common one, edit a production script (Warning) because of some error that needed to be fixed pronto and test it, and it works. But fail to make changes in the test script. New changes to script and done in test and then copied into production and you then here .... why doesnt xyz work anymore ARGH!
Two obvious ones I've made on more than one occasion
Code was slightly more complicated than this, but not much. Stared at it for ages trying to figure out why x got bigger than 10. Called a colleague over, who much to my embarrassment, spotted the problem in about a nano-millisecond.
COCK!
if(x<10);
x++;
Second one was made by the same colleague (which I spotted in a nano-millisecond, and got some self respect back.
(Although I have made this mistake loads of times, I didn't feel like mentioning it)
char x;
for(x=0;x<400;x++)
printf("X");
There were X's everywhere
Potts
Code was slightly more complicated than this, but not much. Stared at it for ages trying to figure out why x got bigger than 10. Called a colleague over, who much to my embarrassment, spotted the problem in about a nano-millisecond.
if(x<10);
x++;
Second one was made by the same colleague (which I spotted in a nano-millisecond, and got some self respect back.
char x;
for(x=0;x<400;x++)
printf("X");
There were X's everywhere
Potts
- piku
- Sheepie Whore

- Posts: 20960
- Joined: Wed Apr 24, 2002 10:44 am 0
- Website: Http://Www.ncot.uk
- Location: Wakefield
- Contact:
Code: Select all
if (x = 50)
some_code();
else
some_other_code();
One that got me for ages was on the GBA. In a GBA there are two pieces of memory to put your data. EWRAM at 0x2000000 and IWRAM at 0x3000000.
IWRAM is 32k in size and is where, by default, all your variables go.
So off you go, merrily creating variables and arrays and suchlike, not really thinking about how much ram you're using. You want an array to control 100 baddies so you make a structure to hold baddie data and an array of this structure, 100 elements long. Then later on you want a small counter variable in a loop and all of a sudden your sprites look 'wrong'. Not corrupt, just slightly wavy and wrong.
So naturally, you start to look at how you're drawing the sprites on the screen. You can't see anything wrong. You run the code through the debugger many times and nothing looks odd.
Two days later I finally twigged that I might possibly have run out of memory. It took me an hour with a pen and a piece of paper to go through every line of code looking for variable declarations and then a bit longer to work out their sizes and see if I had filled its RAM. I had, but "only" by one or two K.
It wouldn't have been so bad if the memory just after IWRAM wasn't a memory map of the GBA's sprite control registers
return (0);



