homepage Welcome to WebmasterWorld Guest from 54.166.113.249
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
What is your worst programming goof
Why am I getting that result, instead of this one?
Baruch Menachem

5+ Year Member



 
Msg#: 3931863 posted 7:41 am on Jun 12, 2009 (gmt 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)

 

coopster

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



 
Msg#: 3931863 posted 10:20 am on Jun 12, 2009 (gmt 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.

nick279

5+ Year Member



 
Msg#: 3931863 posted 5:13 pm on Jun 12, 2009 (gmt 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

rocknbil

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



 
Msg#: 3931863 posted 5:49 pm on Jun 12, 2009 (gmt 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. :-)

nick279

5+ Year Member



 
Msg#: 3931863 posted 5:52 pm on Jun 12, 2009 (gmt 0)

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

Baruch Menachem

5+ Year Member



 
Msg#: 3931863 posted 8:56 pm on Jun 12, 2009 (gmt 0)

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

LifeinAsia

WebmasterWorld Administrator lifeinasia us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 3931863 posted 8:58 pm on Jun 12, 2009 (gmt 0)

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

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



 
Msg#: 3931863 posted 12:50 am on Jun 13, 2009 (gmt 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.

coopster

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



 
Msg#: 3931863 posted 10:31 am on Jun 13, 2009 (gmt 0)

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

Baruch Menachem

5+ Year Member



 
Msg#: 3931863 posted 4:01 pm on Jun 13, 2009 (gmt 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.

Jane_Doe

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



 
Msg#: 3931863 posted 10:11 pm on Jun 13, 2009 (gmt 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]

jatar_k

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



 
Msg#: 3931863 posted 11:35 am on Jun 15, 2009 (gmt 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

selvol

5+ Year Member



 
Msg#: 3931863 posted 10:19 am on Jun 16, 2009 (gmt 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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved