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 ...
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.
-
-
Preventing API abuse is a reason good enough :) BTW if you are wondering why I am asking,
@kotlin now goes from using Java Random to its own (because multiplatform), so they are resigning the core functionality. I quoted your tweets, hope you don't mindhttps://github.com/Kotlin/KEEP/pull/132 … -
Quote away, this is great work! also Java Random is terrible! I'm in the process of Open Sourcing AmazonSecureRandom, the interface/package we have internally.
- 3 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.