TIFU by using Math.random()
Betable Engineering
58635
I almost didn’t read this because I don’t really care for the arcane argument of ‘oh well it’s not truly random’. Then I saw the bit about duplicate IDs.
To check that you weren’t just telling fibs, I ran this quick test: https://gist.github.com/davidgilbertson/4ce2cc7e1deb809ea6f7#file-not-random-js
…and sure enough, got this result:
Generating random strings with 1,073,741,824 combinations
sH1Ru was generated twice after 43,132 tries
Great post.