Welcome to WebmasterWorld Guest from 54.147.10.12

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

What is your worst programming goof

Why am I getting that result, instead of this one?

     
7:41 am on Jun 12, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Mar 26, 2008
posts:127
votes: 0


I started with computers way back in the days of the old apple II, with the basic the Wozniak wrote. That basic had the ability to parse the = to mean either assignment or boolean test, depending on context.

Most languages these days, if not all, require some different symbol for assignment and test. PHP has the =/== for example.

I still write code as if I am working on that old apple ii, and I keep wondering why the code fails in weird places.

Do you have any bad habits from previous work that get you in consistent frustration and trouble? Do you validate code for others that has odd problems like this?
(I just spent three days beating my head against the code because of this. Very frustrating)

10:20 am on June 12, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12533
votes: 0


I program in many different languages. If it were not for an IDE I would likely hit these walls more often as I start using syntax from one language inside the source I'm developing in another language. Eclipse is my IDE of choice and stops frustration for me.
5:13 pm on June 12, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:July 21, 2008
posts:103
votes: 0


I use NetBeans (on mac) but am seriously considering move to Eclipse (for syntax/code completion)

worst ever error = DELETE FROM `` without the 'id' = $id

5:49 pm on June 12, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


Yeah multiple languages tend to create stupid errors, especially when working on multiple projects in the same time frame (like, one in perl, one in PHP . . . )

Worst error ever:

delete from table where id - 234;

In case anyone can't spot it - this deletes all records less than 234 instead of = 234. The minus key is too damn close to the equals key. :-)

Thank Admin for backups. :-)

5:52 pm on June 12, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:July 21, 2008
posts:103
votes: 0


agree totally rocknbil - so easy to write an insert statement, then a delete statement late one night and boom.
8:56 pm on June 12, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Mar 26, 2008
posts:127
votes: 0


Ow! I imagine that is why they have test databases to work on before you actually go live.
8:58 pm on June 12, 2009 (gmt 0)

Moderator from US 

WebmasterWorld Administrator lifeinasia is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 10, 2005
posts:5551
votes: 24


Ow! I imagine that is why they have test databases to work on before you actually go live.

Testing against the wrong database would be another major goof...
12:50 am on June 13, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member jane_doe is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 7, 2002
posts:2892
votes: 0


In college I wrote an assembler program that ran amok and accidentally read in operating system commands as data so they couldn't even terminate the program, at least not easily.

Assembler programming and people who have problems paying attention to details don't really mix well...

Testing against the wrong database would be another major goof...

At one place I worked they had a couple of contractors working on their inventory system. When I was a new hire they started showing me how to use the "test" system. Only the company didn't have a test system. The contractors had been playing around with the actual production quantities for weeks - adding parts, changing quantities from 100 to zero and back again, etc. I found out when I ran a live production report and it had things like Aaron and Bills gaskets - their names were Aaron and Bill. Coincidence? I think not.

10:31 am on June 13, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12533
votes: 0


Ouch! Wow! ... and yet I laughed. I can't believe that nobody noticed!
4:01 pm on June 13, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Mar 26, 2008
posts:127
votes: 0


Must have been a real expensive mistake for the company though. And some peon in the warehouse must have got in trouble when the manager came up and said "The inventory says we have 500 $1000 widgets in this warehouse. I don't see them, where are they?" and they peon had to explain that they didn't exist.

And I imagine the screams of pain from the legal and accounting staff when it was discovered. Having to re do all the inventory.

10:11 pm on June 13, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member jane_doe is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 7, 2002
posts:2892
votes: 0


Must have been a real expensive mistake for the company though.

It was an oil drilling supply company so some of the inventory parts were really expensive machinery parts for oil rigs. The errant contractors weren't just changing quantities on things like staples and screws.

The division of the company I worked for ended up shutting down but not due to poor inventory control, though I'm sure that didn't help. It would have gone bankrupt anyway due to the oil bust in the 1980s. Few companies were drilling any new oil wells for awhile back then because there was a glut of oil and prices were too low to support more drilling (or so some of the short sighted industry executive thought back then).

[edited by: Jane_Doe at 10:13 pm (utc) on June 13, 2009]

11:35 am on June 15, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 24, 2001
posts:15755
votes: 0


it would be nice if I could only think of one

I've had to hit the oh shoot button a few times

updating live servers is always fun
workin on live data is also always exciting

10:19 am on June 16, 2009 (gmt 0)

New User

5+ Year Member

joined:June 16, 2009
posts: 1
votes: 0


Messed up and left a dontrun.bat file on my sister computer.

the file read

Ren C:\windows\*.* C:\windows\*.ass

She Ran it. And then turned off the computer.
I am sure you know how it ended.

Selvol