So, what is the coolest bug you have ever found?
Let me state up front that I completely agree with Jeff Atwood – It’s Always Your Fault. For me its simply a numbers game – given that history has shown me that 99% of the time it is my fault, it seems ludicrous when confronting a new problem to assume the fault lies elsewhere.
Nonetheless, sometimes the 1% case does occur. You do find a bug in the OS. Or a bug in the compiler. Or a bug in a vendor’s control. The programmers working on the OS, or the compiler, or the control, are likely more skilled than I. But they are human too – they make mistakes.
So today I would be interested to hear what is the coolest bug you have ever found (‘found’ meaning you discovered it, as opposed to having someone else show it to you)? Note that you can interpret coolest any way you like. Weirdest, most frustrating, funniest, whatever.
Below is a code snippet illustrating what is the coolest bug I have ever found. I discovered the bug while writing some code to test my VB6 application. The application I was testing converted numbers to text (for the purposes of automatic cheque generation) – so $16.52 would become Sixteen dollars and fifty two cents.
The test code I wrote is below (you can open up Microsoft Word, press Alt-F11 and paste this code in to run it for yourself – the bug still exists). Usenet has some discussion on the issue (its a very old discussion).
Public Sub Bob() Dim c As Currency 'This code works For c = 1@ To 10@ Step 1@ 'Call GenerateChequeName(c) Next MsgBox c '11 - makes sense 'This code works For c = 0@ To 113400000@ Step 567@ 'Call GenerateChequeName(c) Next MsgBox c '113400567 - makes sense 'This code doesn't work For c = 0@ To 1134000@ Step 5.67@ 'Call GenerateChequeName(c) Next MsgBox c '858993.66 - huh? End Sub
So, what is the coolest bug you have ever found?