When version checks go wrong
If Vista had gotten the reception it actually deserved, and become a brand worth keeping, it seems highly likely that the name would have been retained. And Microsoft knows it, which is why internally, Windows 7 is only version 6.1. Sure, the company has made specious claims that this is to avoid breaking applications with bad version checks, but the logic doesn’t really hold; many of those applications are just as broken by “6” as they would be by “7,” and if that were such a concern then the minor version wouldn’t change either.
This might make sense to a lay person on a cursory reading, but as usual with software development, reality is full of subtle but important complexities.
Consider the following rather common version checking mistake:
// Our app is designed for XP (5.1) and later
if (majorVersion >= 5 && minorVersion >= 1)
Given the returned version values from Windows XP (reports 5.1), Windows Vista (reports 6.0), and Windows 7 (reports 6.1) – which OSes will this program succeed on?