Is the iPod Shuffle Playing Favorites?
marksilverman writes "Steven Levy at Newsweek is reporting that his iPod Shuffle seems to favor certain songs. Is Apple receiving kickbacks to promote certain artists? Apple denies it, of course, and Levy had the good sense to ask a mathmatician and a cryptographer who explained that it's probably just humans finding patterns where there are none." Less neurotically, both CNet and PCWorld have discussions of the Shuffle's interior spaces.
From the article:
I explained this phenomenon to Temple University prof John Allen Paulos, an expert in applying mathematical theory to everyday life. His conclusion: it's entirely possible that nothing at all is amiss with the shuffle function
The slashdot article??
Is the iPod Shuffle Playing Favorites?
and
Apple denies it, of course
Enough with the inflammatory headlines!
Quidquid latine dictum sit, altum viditur
The summary suggest that Apple may be playing favorites, citing an article that concludes pretty definitely that they are not...
I think the point of the story is not just to report "news" but open up the topic for discussion. I am sure making the front page will cause at least a few more people to investigate the claim, or at the least monitor the behavior more closely of their shuffle.
Saying Java is nice because it works on all OS's is like saying that anal sex is nice because it works on all genders.
This absolutely right. Also, using this method, inevitably some songs will occur multiple times in the playlist, since you're not keeping track of dupes (much like slashdot).
If you need to randomize an array, the easiest way to do it is to assign each item a random number, and then sort the array using the random numbers as a key. That way every item occurs only once in the randomized list.
You still need a decent pseudo random number generator of course, if you're using a pseudo random number generator that only produces 5 discrete values and repeats them over and over it doesn't help much.
On the other hand, for an application like a playlist shuffle, you don't need a cryptographically secure RNG, just a PRNG (such as a Mersenne Twister), that uses the current time in milliseconds as a seed would do nicely.
SCO employee? Check out the bounty