Windows 10 Technical Preview and Windows Insider Program

A general chat area, here you can post anything that doesn't belong in another forum.
User avatar
Lava89
Vorticon Elite
Posts: 1087
Joined: Thu Nov 01, 2007 15:28

Post by Lava89 »

Levellass wrote: Oh yes, you will not BELIEVE how many programs go 'Hey, is there a '9' in the version name? Ok, that's 95\8.'
Pry tell, what's your explanation for the jump to windows 10? ;)
User avatar
Levellass
S-Triazine
Posts: 5266
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

Lava89 wrote:
Levellass wrote: Oh yes, you will not BELIEVE how many programs go 'Hey, is there a '9' in the version name? Ok, that's 95\8.'
Pry tell, what's your explanation for the jump to windows 10? ;)
Firstly it's *Pray" tell. Secondly... didn't I just give it? I mean... you quoted it right there...
What you really need, not what you think you ought to want.
User avatar
Lava89
Vorticon Elite
Posts: 1087
Joined: Thu Nov 01, 2007 15:28

Post by Lava89 »

Levellass wrote:
Firstly it's *Pray" tell. Secondly... didn't I just give it? I mean... you quoted it right there...
Ok, I could've sworn you were just being sarcastic. :dopekeen
User avatar
Levellass
S-Triazine
Posts: 5266
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

Microsoft is often criticized for being reluctant to break compatibility with legacy versions of Windows. Microsoft must consider this even for relatively simple tasks like naming the next version of Windows. Many of you should be old enough to remember that there have already been two versions of Windows that began with the number 9, specifically Windows 95 and Windows 98.

To save time, some third-party Windows desktop developers used a shorthand to check the version name (not number) of Windows they were installing their app to. Instead of coding apps to check for Windows 95 or Windows 98, developers coded instructions to check for "Windows 9."

That made sense since there were only two versions of Windows that had a nine in their name to that point. It was simply an easier way to figure out which version of Windows the program was dealing with. Check out this Windows 9 search on the code-focused search engine, searchcode, which was first identified by developer Christer Kaitila. At the top of the search results you'll see a bunch of code–again, Java–checking for Windows 9, but not Windows 9.: https://searchcode.com/?q=if%28version% ... ws+9%22%29


Let's look at some example code shall we?

Code: Select all

    /** Performs computation and returns the result, or throws some exception. */
    public HashSet<String> call() throws Exception {
        final String arch = System.getProperty("os.arch");
        String name = System.getProperty("os.name").toLowerCase();
        String version = System.getProperty("os.version");
        if (name.equals("solaris") || name.equals("SunOS")) {
            name = "solaris";
        } else if (name.startsWith("windows")) {
            name = "windows";
            if (name.startsWith("windows 9")) {
                if (version.startsWith("4.0")) {
                    version = "95";
                } else if (version.startsWith("4.9")) {
                    version = "me";
                } else {
                    assert version.startsWith("4.1");
                    version = "98";
                }
            } else {
                if (version.startsWith("4.0")) {
                    version = "nt4";
                } else if (version.startsWith("5.0")) {
                    version = "2000";
                } else if (version.startsWith("5.1")) {
                    version = "xp";
                } else if (version.startsWith("5.2")) {
                    version = "2003";
                }
            }
        } else if (name.startsWith("linux")) {
            Release release = new Release();
            name = release.distributorId();
            version = release.release();
        } else if (name.startsWith("mac")) {
            name = "mac";
        } else {
                // Take the System.properties values verbatim.
        }
What you really need, not what you think you ought to want.
User avatar
Fleexy
Tool Smith
Posts: 1434
Joined: Fri Dec 12, 2008 1:21
Location: Abiathar C&C

Post by Fleexy »

Raymond Chen, a member of the Microsoft Windows compatibility team, wrote an amazing collection of vignettes (PDF) about applications that do really lazy/stupid things and make his work difficult. Definitely worth the read, even if you're not a Win32 developer. Note the one starting on page 9, "When the operating system version number changes."
User avatar
Levellass
S-Triazine
Posts: 5266
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

That document actually explains a number of interesting issues I have with some programs, notably an explorer addon that occasionally hides the address bar of a single window when I boot up.
What you really need, not what you think you ought to want.
Post Reply