The original version of Sim City was written for windows 3.x and included a bug that read memory that had been freed to the system. It worked in windows 3.x, even though it shouldn't, because that particular range of memory wasn't being used for anything else until the program was terminated.
In beta versions of windows 95 Sim City didn't work because the operating system allocated memory differently, and Sim City would crash as expected because of the bug in the program. Amazingly, in the final version of Win95 the original Sim City worked. Microsoft engineers had actually tested backwards compatibility with Sim city, located the bug, and worked around it in their sourcecode.
Now that's serious dedication to backwards compatibility.
I also remember that there was a version of <unnamed product> that rather than sending LVM_GETITEMTEXT would just read the ansi characters corresponding to the selected item during LVN_ITEMCHANGED off of a random location in the stack frame that they had "noticed" held the value. Of course, this eventually changed to a unicode string internally and broke WinZip... so the code that fired off this event would convert the unicode string to ansi and store a pointer in the stack.
I recall being very confused when I encountered this code many years after it had been implemented and had to spend a lot of time tracking through bug databases before discovering why the listview implementation was doing that.
Whoops! Yeah, I'd had WinZip in there originally, then I couldn't remember if this particular story had already come out. I've been gone from MSFT for a long time, but it was generally considered bad form when I was there to call out specific products publicly for their bad code.
but it was generally considered bad form when I was there to call out specific products publicly for their bad code
In a way, don't you think that by not allowing customers to know just how bad the code in the software they buy is, you're encouraging more of it?
If there are advantages to producing quick-and-dirty code that violates platform programming guidelines (some would call this sort of sloppy programming "Getting Work Done"), and there are no consequences (Microsoft knows how bad the code is but Winzip's customers don't), doesn't this exert a subtle market pressure that works against good developers who take the time and make the effort to do things right?
Backward-compatibility for cases such as this can lead to arcane and more complex code within the OS, to difficulty with adding enhancements and creating fixes in the future, and creates larger target areas for folks that are attempting security attacks, and more complex testing.
Bug-for-bug application compatibility is not without costs.
Similar issues came up for a lot of apps in the move to XP, and they wound up implementing a 'shimming engine' that would modify behavior of system calls for different apps to provied bug-for-bug compatibility.