I'm trying to produce something close to the Fisher-Yates shuffle for randomness. I know underscore.js uses this technique on the _.shuffle
method. In Rails, I use either
.sample
And sometimes I do it this way as its a little faster..
.order("RANDOM()").first
But just how random are these? Is there a better way to make this random?