Slashdot Mirror


Schooling Microsoft On Random Browser Selection

Rob Weir got wind that a Slovakian tech site had been discussing the non-randomness of Microsoft's intended-to-be-random browser choice screen, which went into effect on European Windows 7 systems last week. He did some testing and found that indeed the order in which the five browser choices appear on the selection screen is far from random — though probably not intentionally slanted. He then proceeds to give Microsoft a lesson in random-shuffle algorithms. "This computational problem has been known since the earliest days of computing. There are 5 well-known approaches: 3 good solutions, 1 acceptable solution that is slower than necessary and 1 bad approach that doesn’t really work. Microsoft appears to have picked the bad approach. But I do not believe there is some nefarious intent to this bug. It is more in the nature of a 'naive algorithm,' like the bubble sort, that inexperienced programmers inevitably will fall upon when solving a given problem. I bet if we gave this same problem to 100 freshmen computer science majors, at least 1 of them would make the same mistake. But with education and experience, one learns about these things. And one of the things one learns early on is to reach for Knuth. ... The lesson here is that getting randomness on a computer cannot be left to chance. You cannot just throw Math.random() at a problem and stir the pot and expect good results."

14 of 436 comments (clear)

  1. LAST by DamonHD · · Score: 5, Funny

    Hmm, there's a nice shuffle implementation in Java that Microsoft could use... Oh, wait...

    Rgds

    Damon

    --
    http://m.earth.org.uk/
  2. Adding randomness... by Idbar · · Score: 3, Funny

    just requires something like:
    pickabrowser() {
    if (rand()>0.05) {
    use IE
    } else {
    pickabrowser()
    }
    }

    Nobody said anything about bias.

    1. Re:Adding randomness... by K.+S.+Kyosuke · · Score: 4, Funny

      Exactly, as there is always a chance for you to get a better browser due to a stray alpha particle.

      --
      Ezekiel 23:20
  3. Re:What's the problem? by El+Lobo · · Score: 2, Funny

    Exactly, let's force them solve this problem with a .000000001 floating point precision. After all, this is a critical issue.

    --
    It's time to realise that Abble's products are the biggest abomination these days. Just say NO to the dumb iAbble way!!
  4. Microsoft problem solving by gmuslera · · Score: 1, Funny

    There are 5 well-known approaches: 3 good solutions, 1 acceptable solution that is slower than necessary and 1 bad approach that doesn’t really work. Microsoft appears to have picked the bad approach.

    We are still talking here about the random selection of browsers, or something more broad?

  5. Re:Good enough by Anonymous Coward · · Score: 1, Funny

    Given that each user is only going to see this screen once per computer

    Given that each person will only lose one cent per lifetime, I propose to move $0.01 from each bank account in the world to my own account.

    That must be the most accurate and incredible insightful analogy to the issue at hand I've ever seen that doesn't involve cars.

  6. Random by Greyfox · · Score: 3, Funny
    I like this one.

    Anywhoo... So what you're telling me is that Microsoft's programmers made a mistake for a production system that 99% of freshmen CS students wouldn't make? In this case, I think you're actually giving too much credit to Freshman CS students...

    --

    I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

  7. Re:You can't artificially put down competition by pushing-robot · · Score: 4, Funny

    Safari will almost always (almost 50% of the time) be put in the bottom two elements [out of five].

    And how well did you do in statistics class?

    --
    How can I believe you when you tell me what I don't want to hear?
  8. Re:He's just bitching by lennier · · Score: 2, Funny

    On the other hand, the devil is in the details, and one would think that a company such as Microsoft that has been owning the software market for decades now would know how to implement a randomizing algorithm correctly.

    Sure!

    10 RANDOMIZE TIMER
    20 PRINT INT(RND * 5)
    30 GOTO 20

    --
    You are not a brain: http://books.google.com/books?id=2oV61CeDx-YC
  9. Re:What's the problem? by Anonymous Coward · · Score: 5, Funny

    You are missing the point. As the author of the article pointed out, this technique can cause an infinite loop.

  10. Re:He's just bitching by John+Hasler · · Score: 4, Funny

    > ...the manager ignored it...

    Or he decided that it was so important that he had to do it himself.

    --
    Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
  11. Knuth's Quote Re: Random Number Generators by wintermute3 · · Score: 2, Funny

    I always liked Knuth's choice quote from John von Neumann on the subject:

            "Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin."

    - Michael

  12. Quality Standards by LtGordon · · Score: 2, Funny

    I bet if we gave this same problem to 100 freshmen computer science majors, at least 1 of them would make the same mistake.

    Well, that seems an awfully high standard for Microsoft to hold itself to.

    Microsoft: Ranked 1st percentile with Freshmen CS Majors

  13. Re:Malice? by Anonymous Coward · · Score: 1, Funny

    I tried that, and IE appeared in the first slot -every- time. Then I realized that I had javascript off. You might try it in Chrome to get an idea of how much faster their javascript engine is on your system.