This is probably more of a stereopsis.com post, but given that this is short idea, I thought I'd just put it here.
iTunes plays all my old music with the same priority as new music, so I wanted to talk about a really simple way to make random numbers that favor recent things...because it's easy! (We did this in a few places in Picasa.)
Mathematically, the "central-limit theorem" says that if you add together a bunch uniform-random samples, you get something that looks like a Gaussian, which favors stuff around its middle, while still providing some likelihood that "tail" values will get picked.
So I want iTunes to do this:
if randx() returns uniform-random numbers in the range -1, 1:
gaussian = fabs(randx() + randx() + randx()) / 3;
iTunes.nextshuffle = dateadded[gaussian * numsongs];