1+1=3
-
My most memorable subtle bug experience dates back about 14 years. I had just coded a fairly complex piece of logic, but I had worked through the design and coding very meticulously and was certain it would work. But of course it didn't. On a second careful review of the design and code, everything still seemed to be in order. With no good debugger in the coding environment, I began peppering my code with debugging statements to narrow in on the bug. Then I began replacing complex sections of code with simple statements which of course no longer implemented my logic but still demonstrated the bug. After two full days of debugging effort, my broken code was finally reduced to one simple statement along the lines of... print(1+1) ... which produced a result of 3 !?!? After staring at that for quite some time, I ran Windows calculator and typed in "1+1=", and was again greeted with a 3. The fix? After replacing a failed math coprocessor chip, my original code worked just fine.
-
My most memorable subtle bug experience dates back about 14 years. I had just coded a fairly complex piece of logic, but I had worked through the design and coding very meticulously and was certain it would work. But of course it didn't. On a second careful review of the design and code, everything still seemed to be in order. With no good debugger in the coding environment, I began peppering my code with debugging statements to narrow in on the bug. Then I began replacing complex sections of code with simple statements which of course no longer implemented my logic but still demonstrated the bug. After two full days of debugging effort, my broken code was finally reduced to one simple statement along the lines of... print(1+1) ... which produced a result of 3 !?!? After staring at that for quite some time, I ran Windows calculator and typed in "1+1=", and was again greeted with a 3. The fix? After replacing a failed math coprocessor chip, my original code worked just fine.
hahaha. That would give me the sh***. I had a similiar experience. I was experiencing a lot of lags, crash and general software mal functions. I had been writing my own applications that did some advanced things on the machine (Things i have since learned to just leave the f* alone). Fianly out of desperation i thought, maybe my CPU has become covered in a thick layer of dirt and this is causing malfunctions. I went to open the box and was promptly greated with the answer to my quest for the culprit. The Windows XP sticker.
Brad Australian Have you tried Rebooting it?
-
My most memorable subtle bug experience dates back about 14 years. I had just coded a fairly complex piece of logic, but I had worked through the design and coding very meticulously and was certain it would work. But of course it didn't. On a second careful review of the design and code, everything still seemed to be in order. With no good debugger in the coding environment, I began peppering my code with debugging statements to narrow in on the bug. Then I began replacing complex sections of code with simple statements which of course no longer implemented my logic but still demonstrated the bug. After two full days of debugging effort, my broken code was finally reduced to one simple statement along the lines of... print(1+1) ... which produced a result of 3 !?!? After staring at that for quite some time, I ran Windows calculator and typed in "1+1=", and was again greeted with a 3. The fix? After replacing a failed math coprocessor chip, my original code worked just fine.
-
Robert Ranck wrote:
The fix? After replacing a failed math coprocessor chip, my original code worked just fine.
Wow didn't know that can happen, really weird :)
You can't see me :cool:
Yeah, usually the original code doesn't work...;P
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998
"...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above -
My most memorable subtle bug experience dates back about 14 years. I had just coded a fairly complex piece of logic, but I had worked through the design and coding very meticulously and was certain it would work. But of course it didn't. On a second careful review of the design and code, everything still seemed to be in order. With no good debugger in the coding environment, I began peppering my code with debugging statements to narrow in on the bug. Then I began replacing complex sections of code with simple statements which of course no longer implemented my logic but still demonstrated the bug. After two full days of debugging effort, my broken code was finally reduced to one simple statement along the lines of... print(1+1) ... which produced a result of 3 !?!? After staring at that for quite some time, I ran Windows calculator and typed in "1+1=", and was again greeted with a 3. The fix? After replacing a failed math coprocessor chip, my original code worked just fine.
Are you sure the math coprocessor chip actually failed? It might have just been using large values of 1.
Software Zen:
delete this;
-
Are you sure the math coprocessor chip actually failed? It might have just been using large values of 1.
Software Zen:
delete this;
can you say, overclocking?
:badger:
-
My most memorable subtle bug experience dates back about 14 years. I had just coded a fairly complex piece of logic, but I had worked through the design and coding very meticulously and was certain it would work. But of course it didn't. On a second careful review of the design and code, everything still seemed to be in order. With no good debugger in the coding environment, I began peppering my code with debugging statements to narrow in on the bug. Then I began replacing complex sections of code with simple statements which of course no longer implemented my logic but still demonstrated the bug. After two full days of debugging effort, my broken code was finally reduced to one simple statement along the lines of... print(1+1) ... which produced a result of 3 !?!? After staring at that for quite some time, I ran Windows calculator and typed in "1+1=", and was again greeted with a 3. The fix? After replacing a failed math coprocessor chip, my original code worked just fine.
1 = 2; is a legal statement and actually overwrites one.
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
-
1 = 2; is a legal statement and actually overwrites one.
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
in which case 1=2; 1+1 == 4??? or can you 1=1.5f; // ?;P
:badger:
-
in which case 1=2; 1+1 == 4??? or can you 1=1.5f; // ?;P
:badger:
Assigning 2 to 1 would overwrite the value of 1 in some early languages. I don't remember which one I just remember it from comparative languages.
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage