Join me on Discord fluffy rambles

Comments

Just as a reminder, if you’re bored and want to chat with other bored people about geeky things, I have a small but friendly Discord community. We mostly talk about the sorts of stuff I talk about here, but lots of hobbies are welcome.

I’m trying to keep it cozy and comfortable, so if you need somewhere that’s cozy and comfortable, hopefully this is a reasonable place for you!

How not to shuffle a list Code

Comments

A frequent thing that people want to do in making games or interactive applications is to shuffle a list. One common and intuitive approach that people take is to simply sort the list, but use a random number generator as the comparison operation. (For example, this is what’s recommended in Fuzzball’s MPI documentation, and it is a common answer that comes up on programming forums as well.)

This way is very, very wrong.

Read more…