Doing the Microsoft Shuffle: Algorithm Fail in Browser Ballot
robweir.com
robweir.com
IE is said to use a heap/tree related sort[1]. The first thing a heapsort does is swap the last entry with the the front (where the front may have been swapped in the heapify step[2]). Thereafter it leaves the last entry alone.
Since the first entry in the unshuffled array is "Internet Explorer" if it survives the initial comparison it will always occupy the last (5th) place.
The other algorithms don't have a case with only one compare which is why they have more complicated distributions.
[1] - http://www.smallapple.net/rnd/art/how_does_your_browser_sort...
The bug is at the very bottom of the file.
// Genereate random browser order
I'm saving this for an example of how not to comment code.
This has caught me out at least twice by clicking on a browser icon to choose it, then the order changes after I clicked and the wrong browser installer is launched.
Though I do wonder if it makes any difference, may be they are taking this as an opportunity to do some research testing, my personal opinion would be that the browser in the middle position might have a slight upper hand than others.
Don't get me wrong: I'm no fan of MS or IE. But I can see why they might deliberately fail to implement this correctly. [edit: ...]
I don't see this being a result of Microsoft's malevolence, merely a programmer's ignorance. I doubt that Microsoft would do something that would be caught while fighting anti-trust charges.
Does it really matter? No, even with understanding your point, and even thinking that it's an interesting thought that I'm sure we'll see answered.
Does questioning someone's assumption necessarily imply that one is making the converse assumption?
Does it really matter?
I think that's an open question. Note that your definition of randomness is a bit off. The linked article shows that one can predict the occupant of the 5th position greater than 1/5th of the time.