Welcome to WebmasterWorld Guest from 54.146.248.111

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?

     

Baruch Menachem

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

5+ Year Member



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)

coopster

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

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



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.

nick279

5:13 pm on Jun 12, 2009 (gmt 0)

5+ Year Member



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

rocknbil

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

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



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. :-)

nick279

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

5+ Year Member



agree totally rocknbil - so easy to write an insert statement, then a delete statement late one night and boom.

Baruch Menachem

8:56 pm on Jun 12, 2009 (gmt 0)

5+ Year Member



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

LifeinAsia

8:58 pm on Jun 12, 2009 (gmt 0)

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



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...

Jane_Doe

12:50 am on Jun 13, 2009 (gmt 0)

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



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.

coopster

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

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



Ouch! Wow! ... and yet I laughed. I can't believe that nobody noticed!

Baruch Menachem

4:01 pm on Jun 13, 2009 (gmt 0)

5+ Year Member



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.

Jane_Doe

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

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



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]

jatar_k

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

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



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

selvol

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

5+ Year Member



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

 

Featured Threads

Hot Threads This Week

Hot Threads This Month