Have you ever needed to generate a random number in code? whether it's for rolling a dice, or shuffling a set, this tweet thread is here for you! There's no reason that it should be easy or obvious, very experienced programmers repeat common mistakes. I did, before I learned ...
-
-
It is interesting that you think shuffle() should be in the stdlib. IMO it is a niche functionality and is better left in the satellite library.
-
I guess I just see sort() abused as a shuffle so often, with a random comparator, and it just heats the planet with waste energy! People don't seem to think to look for a lib.
- 5 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.