We were discussing nasty software hacks today at lunch. The worst hacks are always in software, but those software hacks have an insidious tendency to seep into the hardware, too. I was reminded of Intel's infamous CPUID hack:
This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2005/08/nasty-software-hacks-and-intels-cpuid.html
Since Windows 2000 wasn’t in wide release at the time, and Intel wanted to avoid this tech support issue, the family code had to be changed to avoid a conflict with Windows NT.
By the time P4 got released at around the end of 2000, Windows 2000 has existed for almost a year.
Looks like Windows 10 had the same issue! Per a Microsoft dev comment on Reddit:
Microsoft dev here, the internal rumours are that early testing revealed just how many third party products that had code of the form
if(version.StartsWith("Windows 9"))
{ /* 95 and 98 */
} else {
and that this was the pragmatic solution to avoid that.
Really? Wow, that’s hilarious!
Also, from the same thread:
indexOf("windows 9") | searchcode
startswith("windows 9") | searchcode
Looks like there’s plenty of software out there that actually does check the version that way.
1 Like