tags:

views:

5610

answers:

60

I remember testing a geographical data normalizer written in Java that had concurrency problems. So, when you tried to normalize a city (say "Rome") and another guy did that too (say "New york"), you would get the other guy's data normalized ("NEW YORK") instead of your query.

What's the bug that mostly made you smile in your career?

+38  A: 

Clbuttic

Let's also remember its counterpart, Consbreastution

Mark Biek
oh man, "buttbuttination" - I'm rofling at work, not good!
Erik Forbes
It makes me laugh to myself every time I read it.
Mark Biek
Funny but not really a bug.
Loren Pechtel
Also, most likely an urban legend. Still hilarious, however!
Andy Mikula
Not an urban legend. I know of a major graphic software company that had such a tight vulgarity filter, it wouldn't let you email them anything with the word "Click" (because that word contains "lick").
Jeffrey Berthiaume
There was even a question here at SO about some code which went through a similar filter: http://stackoverflow.com/questions/374945/what-is-the-origin-of-the-term-baller-which-means-pointer
Suma
@Andy Mikula — See also similar, documented cases like Yahoo!'s "medireview".
Ben Blank
@Jeffrey - I assume you quit shortly after said email wouldn't send?
Chris Lutz
This is unfortunately very real. For example, some German language EA forums have (or had until recently) the English language filter - so several typical German words, including "damit" ("so that" or "thereby") and "ich" ("I") could not be used, even though they're not even correctly spelled English -.- If you ever had to work around something like that, you know that automatic filters are just bad.
OregonGhost
The Guardian's football columnists call the Scunthorpe football team "Firewall FC" for similar reasons.
Tom
There was one edition of a supplement for a miniatures wargame of WWII where the editors had apparently decided to change "FO" (for "forward observer") to "spotter" at the last minute. At least that's the only reason I can see for words like "spotterllowing" throughout the book.
David Thornley
Penis form of a unicorn(http://en.wikipedia.org/wiki/Wonder_Twins)
Roman A. Taycher
+5  A: 

Not a "bug" per se, but what took me quite a while to figure out was when I was mocking up an EBCDIC to ASCII converter in VBScript and Norton AV (or some other AV software, I forget now) apparently kept thinking the keycode mapping code was something malicious and kept quarantining my source code.

theraccoonbear
Avast deleted (avast DELETES stuff, it does not even ask) large swats of stuff I had, because I used demoscene technology, that is also used by pirates and malicious programmers :/ (like the kkrunchy packer, or music technology that is also used in keygens...)
speeder
+13  A: 

I wouldn't say smile but the silliest bug I had was comparing a variable to the letter 'O' thinking it was a zero...

It was pretty frustrating

sebastian
Been there, done that +1
wcm
Years ago I worked in FoxPro. Every so often we would mysteriously get strange, invisible characters in the code, a problem we never figured out. We found we could occasionally solve the problem by retyping the line character for character. When I start to reach that WTF point, I still do this.
harpo
I had that happen to me back in school. We were writing code to manipulate a robotic arm, and the system we were writing it on was an NT4 box. The hard drive was almost completely full, and for some reason that caused Windows to stick random non-visible characters into the source.
Herms
I don't know if it's standard touch-typing, but I type zero and O with the same finger moving in the same direction, and sometimes I don't reach quite far enough. If the shift key happens to be depressed (as in I mistime that, say), it can be hard to spot.
David Thornley
+7  A: 

I am not a resident of Scunthorpe, thankfully.

Chris Marasti-Georg
From that page: In June 2008, a news site run by the American Family Association censored an Associated Press article on sprinter Tyson Gay, replacing instances of "gay" with homosexual, thus rendering his name as "Tyson Homosexual".
Pool
Another great reason against automatic filtering :)
OregonGhost
+5  A: 

Usually, my bugs doesn't make me laugh at all!

Daniel Silveira
+112  A: 

The best bug report I ever got was for the Sims 2. The bug report was, "Ugly naked guy appears."

The bug turned out to be that the NPC in question had clothing from an expansion pack, and the expansion pack wasn't available so he would turn up to your house naked.

MrZebra
would the report have been filed if it were a handsome hunk?
icelava
There's a reason this was the only report.
Sneakyness
+18  A: 

Finding this bit of code after another developer threw his hands up in frustration:

for ( int i=0;i < numrecords; i++ )
{
    // a dozen lines of database code that used i
    i=0;
}
Robert S.
Won't compile (in Java). You have the increment expression before the conditional expression in your loop header.
Bill the Lizard
Nice catch, fixed. It wasn't a copy and paste, but a quick write before my boss walked up. :)
Robert S.
+20  A: 

Early in my career, I was doing some UI work and couldn't figure out why nothing was appearing in the cells of a tabular view. After the better part of two days, the answer presented itself.

Apparently having the foreground and background color the same makes the text hard to read 8-)

Taught me a valuable lesson though, never overlook the obvious.

Robin
This is why I always worry about looks after the code is working... or before... but during coding I only care that everything is very very visible, no matter how ugly it looks.
schonarth
Same here, thats why when I'm working on some CSS styles I make elements bright blue, green, and red. It looks ugly, but it helps to debug.
JonathanMueller
+13  A: 

Setting constants in 'C' and putting zero on the front of each of them so that they lined up neatly.

Worked fine when there were only 7 of them but it took several versions of the program to work out why the tenth and eleventh message =0010 and =0011 weren't getting there.

By chance codes 8 and 9 weren't used.

Martin Beckett
It was treating the number as octal?
Erick B
Correct - I thought it was more interesting to leave that moment of realisation to the reader.
Martin Beckett
Been there done that :)
EvilTeach
i noticed that immediately
GameFreak
That's why I have my syntax highlighting set up so that it uses a different color for octal number literals :)
OregonGhost
+8  A: 

It was when the Renault Laguna III was about to be released. The test vehicle had a right-hand side steering wheel and when I opened the driver's door, the display showed that I had opened the left door :)

Anyway, I started the engine and ran the diagnostic tool. It showed that the injection is not OK and the car couldn't drive at more than 10 km/h. Also at stopped position the tool displayed that I was driving at -1 km/h :)

Finally, the fuel tank was almost empty and there was a big attraction to the public driving the non-released Laguna III at 10 km/h to the nearest gas station :)

m_pGladiator
+9  A: 

The old printer on fire bug happened to me at Uni. Scared me to death.

http://marc.info/?l=linux-kernel&amp;m=102893054014512&amp;w=2

Suffice to say the printer was not actually on fire.
But the message was scary enough.

Martin York
Had I run into this message, I would simply assume the programmer was being cheeky -- scary to think this was once a real error condition!
Adam Lassek
I really want to upvote, but this is more a funny error message or failure to maintain code than a bug.
outis
LOL, "ummm no."
tsilb
+65  A: 

I wrote an OnChange or OnKeyUp, etc. on a TextBox once. Whenever I typed in it, I would get really erratic behavior. I spent hours trying to debug it before I realized it was the batteries in my wireless keyboard going out.

John Kraft
I finally got fed up with my wireless keyboard and replaced it due to things like this.
TM
I had this one once
vdhant
Done this as well.
Rex M
I wondered if it was an OS issue http://andrewjgrimm.wordpress.com/2009/01/04/when-your-wireless-mouse-lacks-zap/
Andrew Grimm
+33  A: 

We got a couple crazy bug reports from Sega testing of our baseball game.

We had a scoreboard that animated when certain things happened. One showed the batter holding a bat which then burned up like a match when the player struck out:

"Scoreboard animation shows player holding bat that turns into giant flaccid penis. Scoreboard animations must not contain any form of penis."

Or, for the baseball challenged:

"Often, when playing the fielding team against an AI batter, the batter will take or swing at the first pitch, take or swing at the 2nd pitch, then swing at the 3rd pitch, either hitting the ball or striking out."

Ya... um, that's called Baseball.

Bill James
I like the 'any form of penis' part. As if there exists some form that actually would be acceptable!
Outlaw Programmer
I like the Scoreboard animations part. You can't put flaccid penis on a scoreboard, but if you put it on the Jumbotron, you're good to go.
Sneakyness
+8  A: 

One of my favourite bugettes was a list of customer data that seemed to very occasionally sort incorrectly so sometimes Mr Downing would appear above Mr Downinger and sometimes the other way round.

Eventually this problem was traced back to a historic developer trying to "ensure" that all the names were unique by appending a guid to the name, they didn't realise that the sort was also applied to that cell meaning that v.occasionally Mr Downing would get a guid appended that made alphabetically AFTER Mr Downinger.

Quibblesome
+5  A: 

When trying to test some ORM I created a quantum test. It was thus because the action of confirming if the test had succeeded (by using the session to query for the existence of the object) actually forced the session to persist the object and for the test to succeed.

Without the code that tested the success the entity was not persisted. :O

Quibblesome
Reverse Heisenbug - nice
Erik Forbes
No, normal Heisenbug. Debugging code appears, object appears, bug disappears.
finnw
+29  A: 

I got one

if (accountExpired)
{
   // do something
}
{
   // do something else
}

remember to read between the line lol.

c.sokun
Ow, that looks tough to find. That would be a great place for a compiler warning.
Jeffrey L Whitledge
One reason why I like java-style same-line braces :). } else { is a lot harder to screw up. It's also a lot more compact!
TM
I like about no braces at all because of this.
Cheery
Well, it *is* strictly true. It does do something else. :)
Chris Farmer
I love it. I was knocked out that it even compiles, but of course it did and I got the obvious behavior. I can't wait to spring this on a candidate in an interview. That is, if they ever let me harrass -- err, interview one.
Cyberherbalist
Oof. Took me a sec, and I already knew something was up. =X
Erik Forbes
it took me 3 minutes to understand why you are upvoted !! :D
Nicolas Dorier
@TM, I thought Java-style braces was exactly what was posted above, and what you're posting is C-style braces...
DisgruntledGoat
Ben Blank
+5  A: 

When I first started programming I tried to a make a simple calculator program in QBASIC. If I remember correctly it looked something like this:

INPUT "Enter the first number:"; num1$
INPUT "Enter the second number:"; num2$
PRINT num1$
PRINT "+"
PRINT num2$
PRINT "="
PRINT num1$ + num2$

I couldn't figure out why it was saying 1 + 1 = 11 and 1 + 2 = 12. :P

(In QBASIC, variables that end in $ are strings, and + is the concatenation operator...)

yjerem
This sort of thing is why I'm baffled that some people prefer loosely-typed languages like JavaScript.
Kyralessa
This is why Perl uses a different operator for concatenation ( '.' in Perl5 '~' in Perl6 )
Brad Gilbert
That's not a bug, that's a user/programmer error. And not even that funny. <grin>
peSHIr
Aren't all bugs programming errors? Hardware bugs aside, I'd say this is definitely a bug.
JulianR
+20  A: 

I have a habit of hitting ';' at the end of my lines when programming in c++.

for (i=0; i<end; ++i);
{
  //code
}

I did that in a programming competition. We lost.

(It's a good idea to turn on compiler warnings)

Phoenix
That is why I write it like this 'for (i=0; i<end; ++i){'
Brad Gilbert
Even tho I do that also, I still managed to sneak a ';' in there one day -- took forever to find.
Will Hartung
Been there, done that (in Java). Is there anyone working with C-like languages who hasn't at one time sitten in front of a debugger cursing at the "impossible" behaviour of a program not executing a block guarded by a definitely-true if clause?
Michael Borgwardt
While learning first learning C back in the Dark Days of MS-DOS, this little goof of mine would lock up my machine. i=0; while( i<10 ); { i++; }
David Poole
for (i=0; i<end; ++i);{; //code};
Callum Rogers
+10  A: 

At university we had to implement a calculation algorithm using Fortran 77. Having never used it before it took a while to implement it and get it running, but to my disappointment the calculation result wasn't correct. I spent a hours time checking every line of code, especially the part that did the distribution of the data to the calculation nodes, and the aggregation of the result, and everything looked right. I carefully checked every part of the long equation that gave the final answer, and it was exactly as in the problem description.

It wasn't until I turned the syntax highlighting on I noticed that the last term in the equation ( / Z ), was dark blue...

If you ever have to touch Fortran 77, use syntax highlighting and make sure not to write code beyond column 72. Beyond that, everything is automatically considered a comment by the compiler.

Claes Mogren
Definitely a language misfeature.
Brad Gilbert
It was not a language misfeature. If you dropped a deck of cards you had better hope that the sequence numbers were correct in columns 73 to 80. Compilers ignored those columns but card sorters were set to use them (least significant digit first).
Windows programmer
+19  A: 

When I first started learning AJAX I implemented a webpage that checked if a photographer was busy on a certain date or not.

I used a tutorial to start with, and replaced what I needed to get it to work.

Unfortunately, I forgot to change the error message, so if you entered a date in the past it said:

"Merry Christmas!"

The tutorial checked if it was christmas or not you see. Didn't notice until the client informed me of strange behaviour...

Rich Bradshaw
I left in an alert message that made it through to production. Bug was filed: "Customer reported error message 'Aaaaaaayyyyy!!! Error-a-mundo!' Unsure of how to proceed."I had a lot of late nights on that project.
iKnowKungFoo
+28  A: 

Testing iPhone accelerometer code in the simulator, and wondering why I'm not getting any data.

Bemmu
Did you try jumping up or down? Or were you using a laptop! LOL
Guy
I imagine he was dragging the simulator window wildly around the screen!
Outlaw Programmer
Actually, some modern laptops come with built-in accelerometers in order to implement support for shock detection and automated storage flushing (hard disk)... :-)
none
@Outlaw Programmer — Actually, they should seriously make that a feature!
Ben Blank
LOL, that would surely make for an awesome easter egg feature !!!
none
I believe that all laptops capable of running the simulator have a motion sensor.
GameFreak
GameFreak you've read my mind. I came here to say the exact same thing. I believe the air might be an exception from this, as it has no moving parts in it's hard drive, thus no need for an accelerometer.
Sneakyness
+2  A: 

A friend in college asked me why his code wasn't compiling. I was reading over it and found he had a variable named IndexOfSmallest, but at one point he had misspelled it as IndexOfSmellest. Now that's what I call a code smell!

Erick B
+4  A: 

In the college days, we were supposed to choose a classic concurrent problem and deliver a resolution on C. A friend was working on The Sleeping Barber problem and asked me why his code was not working. When he ran the program to show me what was happening, the following appeared on the screen:

I'm gonna release
I'm gonna release
Sit on the Barber!

I'm gonna release, in portuguese, is an obscure sexual pun...
The error was unrelated to the output, but the unexpected and hilarious image of customer asserting his homosexuality and sitting on the barber is something always remembered when there is a reunion of our old college gang.

Renato Soffiatto
"I'm gonna release" basically works in English, if you have your mind in the gutter.
outis
+2  A: 

I added some test code that called our unexpected exception handler with the text "this is not an error", and put it in the File->Exit code to make it easier to test. I'm more of a "red X" guy, so I kinda sorta forgot about it... until a customer reminded me.

Jon B
A: 

Trying to execute a 'dump' program but constantly misspelling it as 'dumb'.

gyrolf
Vertical dyslexia?
outis
@outis, or was just used to saying "dumb" ;-p
Pharaun
+8  A: 

Not really a bug, exactly. But, on one of my first paid gigs I was working with an ISAM database library that prefixed all of its error-reporting functions, constants, and other related stuff with "wtf_". Being young and rather naive, I didn't understand the significance of the prefix until the first time it actually reported an error, and I uttered the three magic words.

Sherm Pendley
+2  A: 

I once misspelled the name of a constructor in C++:

class TotalBBBetaTeams {
    public void TotalBBetaTeams() {
       // code would never get called.
    }

};

Now, of course I got the compile error that I was missing a return type first, so the "void" there was added to fix that error, instead of fixing the spelling. Constructors don't (can't) have return types.

Bill James
+31  A: 

While learning a new computer system, I wrote a program to play blackjack. One of the people using it discovered that he could enter a -negative- value for the bet and then deliberately lose the hand. When this happened, the program obediently subtracted the negative value from the player's money total, thus giving him more money every time that he lost.

Since that day, I have been a lot better at checking user-entered input values.

mkClark
I remember a commercial SF trading game where you could dump cargo and the amount was not checked for negative values...
Michael Borgwardt
@Michael Space Pioneers, spotted :)
lImbus
I made this when I was 11: http://homepage.ntlworld.com/david.rogers23/betGameOpener.htm try entering negative numbers and notice the Comic Sans and BMPs with .gif extensions. Sometimes the cars don't stop.
Callum Rogers
+33  A: 
Jacco
Oh very nice, lol
Erik Forbes
Classic. Game programming bugs usually amuse me more because instead of dealing with a program, you're dealing with a creation, you think of it differently. That monster AI that you couldn't get to stop running in circles? Yeah that got implemented as a feature for drunk monsters.
Sneakyness
A sense of humor *and* an Easter Egg? +1 Classic!
Avery Payne
I remember that game. Nice one.
Arnis L.
+1 for that great game. I still remember the voice of that grenade tosser guy - "here catch!"
Chris Thornton
+20  A: 

I was recently debugging some code on a coworker's machine and noticed subtle typos peppered throughout his code. Every lowercase letter l had been replaced by an almost-identical number 1. I was about to point this out, amazed that the code even compiled, but stopped myself when I realized the problem.

Many moons ago, when we were first learning linux, I figured I'd help him hone his troubleshooting skills by creating an alias in his .bashrc startup file. (Right about now, the corner of your mouth is curling up in a smirk, isn't it?)

Right: I aliased the cat command to make that replacement each time he typed a file. And in all these years, he'd never noticed anything wrong, and he never found my joke!

It's still there ... waiting.

Adam Liss
You're evil.
OregonGhost
+7  A: 

An employee added some grid adorner code to the OOFILE report-writer engine, to draw borders around tables. It crashed the Mac every time he printed.

After an unknown time it was turned over to me to debug, being responsible for most of the report writer code - I was expected to have some magic insight.

It was only through very slow sing-stepping that I noticed that at one point he redrew a line on top of itself, rather than having more complex conditional logic deciding when to draw a line or not. On nothing more than instinct, I took that code out and it fixed the crash.

I came to the conclusion that the Laserwriter printer driver, which was converting Macintosh PICT drawing commands to a Postscript program, was unable to handle identical line segments drawn on top of each other.

Thats my funniest bug I can remember, in over 25 years. I can't remember what time in the morning I finally found the bug but I'm pretty sure my ecstatic yell set off a few car alarms in the adjacent park.

Andy Dent
+1  A: 

When I had just met my future wife I was walking around twitter pated for a while.

After replacing a critical financial report formula with the following bug

SET A = A

my employees rebelled and forbid me to code for the next two weeks.

Noah
+101  A: 

At Microsoft, there's a hardware test lab that's responsible for testing the zillions of webcams out there against each new build of Windows to make sure it doesn't break anything. One of the webcams was rolling when the 2001 Seattle earthquake hit.

After that earthquake, every bug database in the entire company had a few bugs entered of the form "when I click on the Update button, the entire lab starts shaking", or "when I deleted the file, things started falling off the shelves".

Most of the bugs of that form were closed "not repro".

sblom
That's a good one.
Developer Art
This is great humour!
Stefan
+4  A: 

As a teaching assistant in college I had a student come to me with a listing. "I don't understand why this doesn't work," he said. "It's too SHORT to have any bugs in it!"

n8wrl
nothing's too short to have bugs in.
Sneakyness
True, I saw someone code a bug into Hello World.
Tom
I saw a guy crash windows with Hello World... I don't remember exactly what he did, but it involved misuse of %s with a string not terminated in /0 and some other funky conditions at the time, that caused a cascade of events that crashed that particular machine. Other machines only the app crashed, not windows.
speeder
+2  A: 

When using TOAD for Oracle, I would get the error message "Error: No Error". Makes you scratch your head now and then and say "what!?"

Ascalonian
+4  A: 

In C/C++:

 #define true false // happy debugging losers
Brian R. Bondy
I get it - you typed 'loosers' instead of 'losers'!
Andy Mikula
+2  A: 

While debugging i found something like this:

if(dataRow.isBirthDateNull)
{
  //some error handling code here...
  errorMessage = "..." + dataRow.BirthDate.toShortDateString();
}

First i thought was... omg this guy fails at fail!

Drevak
+5  A: 

when in junior high, a bunch of us were learning to program in BASIC.

and we typed in a program

for i = 1 to 1O
print i
next i

and it couldn't run... so the few of us including a more senior guy was going over it about twenty times. and we thought, maybe the computer got crazy... and one of the smart guys said, maybe the motherboard was too hot... and then after half and hour, we found that the 0 was typed by one of the genius as a capital "o".

動靜能量
+9  A: 

the first time i ever learned about C, i tried homework #1

#include <stdio.h>;

int main() {
  printf("hello world");
  return 0;
}

and for an hour the program will not compile... and then later on, i found that "in C, every statement should end with a semicolon" doesn't apply to a preprocessor line...

動靜能量
+1  A: 

This is not a strict developer bug but anyways...

When building an electronic device for our company everything worked out very well. The PCB-layout turned out to work and every card we got manufactured worked.

We built a complete system and in our test bench everything worked out nice.

But when it was time to take the system live the communication between the "master" device and a computer would not work, we got strange messages and so on ... After a while we stumbled upon the solution, pick a 1 ohm resistor and put it in series with the power supply, everything worked! At present we do not really know why this solved our problem, some kind of low pass filter ... but hey ... it compiles, ship it.

Daniel Persson
+4  A: 

Many moons ago the company I worked for changed the location where images for our web app were located. It took some time for this change to percolate thru the source tree, so for a few builds we had red X's on many of our web pages (buttons, logos, etc) as paths were adjusted. This was obviously frustrating to a lot of us...

After the dust settled several weeks later the red X's appeared again! The paths were right, the code looked good. What was wrong?

Some prankster (ahem) had checked-in an IMAGE of a red-X on top of most of the 'real' images - buttons, logos, etc. So on subsequent builds we DEPLOYED a bunch of red-X images!

TG for rollback.

Brilliant!

n8wrl
+1  A: 

A configuration file setting in a 3D simulation I wrote accidentally scaled everything by multiplying by zero. The result was that nothing appeared in the world. Several days of adding sanity checks finally found the culprit.

It's funny now, but not at the time. It taught me the value of adding asserts.

Jeff Moser
+2  A: 

One of our programs had placeholder error messages during development, they were supposed to be replaced by localized messages before the release of the program. However, at least one of them wasn't. One day our support desk got a call from a scared customer who didn't dare to touch the computer after "TERRIBLE ERROR!" popped up on the screen...

Kaniu
+3  A: 

When I was first working with ML for class, I wrote a quicksort method that just would not terminate, ever! I would enter my call to test quicksort in the interpreter, press enter, and then wait and wait and wait until I got fed up and killed it. Eventually, I stepped through my program by hand, step-by-step, through all the recursions, and proved to myself that it MUST be terminating. It was only then, after nearly an hour of debugging, that I realized the interpreter was simply waiting for me to enter a semi-colon to tell it I was finished with my input and to interpret my command. The quicksort method worked perfectly.

Another fun one I do ALL the time:

for (int i = 0; i < height; ++i)
{
    for (int j = 0; j < width; ++i)
    {
    }
}
Nick Lewis
Copy-and-paste bugs are the worst!
MatrixFrog
Oh this isn't even copy-and-paste related. I just always type i instead of j!
Nick Lewis
+14  A: 

I was writing some stock code to recursively delete all the files/directories after a process had been completed. Easy stuff.

I ran the program and imagine my surprise as all my source code files suddenly disappeared.

The working directory in question was a subdir of the bin directory, which was in turn a sub dir of the source code. No problem right? Except my base case test to halt the recursion had an error which caused it to perform 2 more iterations than necessary.

Due to the secure delete utility we were using, I lost about a week's worth of code.

I like to think that my software humbly committed suicide in protest against its massively incompetent creator.

Alex
+1 for that last bit.
Cameron MacFarland
+16  A: 

Programming a boss monster for a platforming shooter. The boss had a very simple behavior pattern: if at long range, throw a grenade. Otherwise, occasionally fire bursts from a machine gun. In any case, close to within a certain distance from the player. Simple, right? I went with a simple signum function to determine which direction to move. (If it matters, positive x is to the right.)

x+= 3 * sign(x - Player.x);

See the problem?

Consider Player.x = 200, Boss.x = 400. sign(400-200) = +200, and the boss moves RIGHT.

Enemies were also coded to die immediately if they left the play area.

Battle starts, boss walks backwards off the screen, dies horribly, battle ends.

Jim Dagg
+8  A: 

Coding some assembler on an old Amiga A1200 (15-17 years ago) I was trying to blit an image onto the framebuffer in my program. Didn't work, but it still ran through the loop without hitch.

I shifted between the asm and the program a few times, then I decided to give up for the day

Now, the Amiga had fast preemptive multitasking (for its time) due to the lack of inter-process memory protection (i.e. no MMU/TLB).

So, when I closed the assembler and saw the desktop, in the background was my picture!!

(I had copied the image alrigth, to the wrong place, which was on top of the desktop background picture, managing to not overwrite any critical code or data. It was there until the next reboot. 8-D)

Marcus Lindblom
+1 for dodging a bullet. What happened to your +1 Mouse of Dexterity?
outis
+2  A: 

One of the very first programs I wrote was a small BASIC program that generated 7 random numbers for the Lotto. I won $7 the first week. The following week I ran the program again and was baffled by the output being something like 2,4,7,7,10,26,26. That was very hard problem for me at age 11. That ugly old ABC80 sure taught me a thing or two.

Jonas Elfström
+22  A: 

A long time ago, I knew a guy that had to create a left to right scrolling banner with Javascript for a website.

When he was done, it turned out that if you made the window smaller than the width of the site, the whole site would scroll right to left, while the banner held still.

Eli
A: 

My funniest bug was when I was just entering college. In high school, we were using Pascal, while the college class I took was using C++. Naturally, I was still using Pascal conventions.

While writing one application for the C++ class, I forgot about the C convention of () after a function name and was still working as I would a Pascal programmer. Instead of getting back something logical like "functions must be terminated" or something similar, the compiler was telling me that it was an invalid variable cast. Took me about an hour of searching for help on the problem to fix it, but I got MS to create a bug report and got my program finished. Never forgot the differences between conventions again.

Tom
A: 

Ok, I just got a compiler message that seems like too funny of a bug and makes my previous answer look pathetic.

In Delphi 5 (maybe in others too), set a breakpoint on a begin statement, let the code run to the breakpoint, then do an evaluate/modify on the begin. The error message is "Expression too complicated".

Tom
+5  A: 

Not my bug, but I worked in QA on the first Rock Band game. One day I was poking around in the bug database and found that someone had submitted one alleging that the "Don't Fear the Reaper" track--you guessed it--needed more cowbell. I kept an eye on it; when we got the next release, it was marked for regression with the dev comment "Increased the volume of background instrumental." Apparently the tester found this satisfactory and marked it as a fix.

My favorite bug of my own was when I was working on an IRC bot which would, among other things, choose between two options when prompted. Just to be silly, I added to its list of hardcoded responses that when it was asked "Apples or oranges?" it should say "Bananas!" Well, I screwed up the edit--overloaded a variable, if memory serves--and managed to create the situation where any time anyone said ANYTHING in a channel with the bot (addressed to it or not), the bot would reply, "Bananas!" Luckily I was running it in a test channel, not the 300+ user channel it now lives in! (It still cracked up the channel admin enough that he made it an easter egg in his own bot.)

+2  A: 

Worked only while debugging

if (log.isDebugEnabled()) {
    // some debug stuff
    log.debug(...);
    doSomethingVeryImportant();              <----------------
    log.debug(...);
}
stacker
+8  A: 

Just ran into this one myself (it is Tuesday): OpenOffice doesn't print on Tuesdays. (To Brother printers anyway). I can confirm the fix works.

timday
A: 

I worked intensely as sole dev on a team to create a data entry internet app for a small clinic. We finish, ship, and after initial flurry of support tickets, there is a long period of silence, and then this:

When I press BACKSPACE I end up on the previous page, Client Listing.

IS VERY ANNOYING ! PLS FIX !! !!!

Facepalm. = /

rlb.usa
+3  A: 

I've been doing some game (MUD) development. While programming containers, I added the command put, so can put an object into a container. Turns out, I'd forgotten to add a check that the object you were placing in the container wasn't the container itself.

This ended with me putting a handful of daggers into a rucksack... and then folding the rucksack up inside itself, thus disappearing.

Chris
I figured how to go to limbo in a MUSH... I created a object, then I entered the object and set my home inside it, then I left it, and grabbed it, then I typed "home".
speeder
+6  A: 

A customer called up and said every time he drank coffee, our daily synchronization program would hang the computer.

Obviously the guy took his coffee-break whilst synchronization ran because it was processor, and time-intensive. Turned out he was using a proper desktop system with a horizontal( instead of a tower ) cabinet. The cabinet had sustained some damage, and placing a full coffee mug on top of the cabinet would kill the processor-fan, and Voila!

Drove us crazy figuring out what was going wrong, and we only got it by accident (Luckily!)

Everyone
+3  A: 

As a practical joke on a fellow designer, I added some Javascript to a website project we were working on to make the browser slowly and randomly wiggle around the screen when users named "Michael" signed in on Fridays.

A laugh was had by all, the product shipped, and I'm sure you can guess what strange bug started occuring in the wild.

Some rollbacks had occured and the removal of my easter egg was undone. To add insult to injury, it was rolled back with and forgotten about by yours truly.

Allbite
+1  A: 

In a web app I was working on we ran into a problem where pasting data sometimes failed. After some examination it seemed you could paste forward ( to the right and below ) on the page but not behind. We found the culprit:

source, target = Pasteable.find(source_id, target_id)

The paste able objects happened to be in id order on the page. ActiveRecord returned objects in id order, not the order passed in.

Katie