What's the stupidest mistake you ever made?

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.
User avatar
piku
Sheepie Whore
Sheepie Whore
Posts: 20960
Joined: Wed Apr 24, 2002 10:44 am 0
Website: Http://Www.ncot.uk
Location: Wakefield
Contact:

Post by piku »

Flabio wrote: Worst thing I've ever done is related to writing a LAN play mode in a previous job. I had two machines set up, and I thoughtfully compiled the exe locally on each machine. The two machines would always drift slowly out of synch with each other. Never occured to me that the second machine would have a different service pack on devstudio, so it was compiling the float code slightly differently. Copied the exe from one to the other, and it all worked fine. Time lost: 2 weeks.
Isn't network code fun :)

In a previous life I wrote a simulator for the fancy new Virgin trains. It was all written in our office using a bizarre 16bit windows program called ISaGRAF.

This thing was slow. Seriously slow at compiling files. The "train" consisted of 10 PCs running NT, one per carriage. So every build had to be built 10 times. It took around 14 hours to build.

Now the fancy thing was, we could test the code in our office to a certain extent, so when we went to visit the nice train people we could load it up and off they go, playing with the simulator.

Except the time we drove all the way to Birmingham, loaded the software up, turned it on and watched all 10 PCs lock up. It was great, you could see them arguing over network-wide state variables - setting them high, setting them low, flip/flip/flip/*CRASH*.

We debugged the code in about 10 minutes and took the rest of the day off to let the thing recompile itself. We came back in the evening to see what was going on and were confronted with

"somefile.blah : Syntax Error, Line 10".

Somefile.blah was the SECOND file in the list of stuff to compile. It must have barfed about 30 seconds after we went out. A few choice words from us accompanied by a lot of laughing followed from the other techies nearby :)


There was also the time when I accidentally unplugged someone's UPS... that is, I unplugged the cable that powered the rack full of telecomms equipment, routers, switches and an NT server. The really funny thing was that in the five minutes it took me to get it all up and online again nobody noticed 8O
return (0);
User avatar
Snakey
Baaaaaaa!
Baaaaaaa!
Posts: 8938
Joined: Thu May 09, 2002 4:17 pm 0
Location: Hell on Earth

Post by Snakey »

hairy_pete wrote:Hence the coding rule that such equation is to be written with the constant on the left side
Yea, but what kind of dumb-ass compiler won't throw up a warning if you get it wrong anyway?

This is what warnings are for - don't ignore them ;)
Nothing is worth the effort you put into it.
User avatar
piku
Sheepie Whore
Sheepie Whore
Posts: 20960
Joined: Wed Apr 24, 2002 10:44 am 0
Website: Http://Www.ncot.uk
Location: Wakefield
Contact:

Post by piku »

Snakey wrote:
hairy_pete wrote:Hence the coding rule that such equation is to be written with the constant on the left side
Yea, but what kind of dumb-ass compiler won't throw up a warning if you get it wrong anyway?

This is what warnings are for - don't ignore them ;)
Yeah, really bugs me watching other people's code compile, and the poor compiler spew its guts over trivial warnings.

Invariably the code still works despite the warnings, but you know, it's not hard to spend an afternoon making your compiler happy. You quite frequently fix bugs you never knew existed.
return (0);
User avatar
Oaf
Baaaaa!
Baaaaa!
Posts: 1688
Joined: Mon Nov 11, 2002 1:14 pm 0
Location: Dark Hedges
Contact:

Post by Oaf »

Not programming related, but must be the winner by far:

City Wanker: "I'll give you 6 million pounds for a 51% stake in your company"

Me: "No thanks"

Doh!
User avatar
Flabio
Baaaaaaa!
Baaaaaaa!
Posts: 8717
Joined: Wed Mar 03, 2004 12:37 pm 0
Location: Guildford

Post by Flabio »

Snakey wrote:This is what warnings are for - don't ignore them ;)
"warnings as errors" - the one true way. We have that at work, saves no end of hassle.
User avatar
rowan
Baaaaaaa!
Baaaaaaa!
Posts: 7965
Joined: Tue Nov 25, 2003 11:53 pm 0
Location: Notts.

Post by rowan »

Changed my working directory to live instead of beta and issued a ton of SQL updates. Started running some queries and got unexpected results, scrolled up the command history and realised I'd hosed a day's worth of data :oops:
User avatar
moobaa
Sheepie Whore
Sheepie Whore
Posts: 16118
Joined: Sun Sep 29, 2002 8:08 am 0
XBL Gamertag: petee moobaa
PSN: moobaa
Location: Sydney, Australia

Post by moobaa »

Oaf wrote:Not programming related, but must be the winner by far:

City Wanker: "I'll give you 6 million pounds for a 51% stake in your company"

Me: "No thanks"

Doh!
8O

:winner: indeed.
User avatar
Snakey
Baaaaaaa!
Baaaaaaa!
Posts: 8938
Joined: Thu May 09, 2002 4:17 pm 0
Location: Hell on Earth

Post by Snakey »

moobaa wrote:
Oaf wrote:Not programming related, but must be the winner by far:

City Wanker: "I'll give you 6 million pounds for a 51% stake in your company"

Me: "No thanks"

Doh!
8O

:winner: indeed.
Money isn't everything and all that, but I have to say that if someone offered me 6 million quid for 51% of my company, my answer would have been:

"Fuck that mate. Give me 7 million and you can have the fucking lot. I'm off on holiday. See ya."
Nothing is worth the effort you put into it.
User avatar
hairy_pete
Baaaaaaa!
Baaaaaaa!
Posts: 7217
Joined: Mon May 27, 2002 8:10 pm 0
Location: A Tiny Village in Bavaria

Post by hairy_pete »

Flabio wrote:Friend of mine in e-commerce was writing a system to bill credit cards. He had no stock database to work with, and no test credit card. He ended up billing his own card £200 for a cow. It appeared on his statement as 'a cow'. Took him months to get the cash back :)
NNNNN ... you'll be the winner for the worst slow pun. Like, having no live stock database and thus having to make up the purchase of a cow. :lol: :roll:
User avatar
Oaf
Baaaaa!
Baaaaa!
Posts: 1688
Joined: Mon Nov 11, 2002 1:14 pm 0
Location: Dark Hedges
Contact:

Post by Oaf »

Snakey wrote:Money isn't everything and all that, but I have to say that if someone offered me 6 million quid for 51% of my company, my answer would have been:

"Fuck that mate. Give me 7 million and you can have the fucking lot. I'm off on holiday. See ya."
Indeed.

The guy was a tit though, a real stripy-shirt-and-braces type, and my mate who worked alongside him was already having problems with him; so the prospect of him having a controlling interest in the company and being contractually obliged to work for him for three years clouded my judgement a bit.

Besides, we'd only been going six months, been valued at 28m, and we thought we were going to take over the world :lol:
Post Reply