ai / nanoid

A tiny (124 bytes), secure, URL-friendly, unique string ID generator for JavaScript
https://zelark.github.io/nano-id-cc/
MIT License
24.22k stars 790 forks source link

More intuitive calculator? #444

Closed olalonde closed 11 months ago

olalonde commented 11 months ago

In case it helps anyone, I just went down the rabbit hole of calculating the amount of random bits required to avoid collisions using a different approach. The traditional Birthday Paradox formula gives us a probability (e.g. less than 1% chance) but it's not very intuitive to understand what the probability means in terms we are used to as developers. So I tried a different approach: expected time period for one collision to happen. Feel free to use.

https://colab.research.google.com/drive/1ec4n7Ex9bnkl_c45EUlIPCNtsLKrwaB2?usp=sharing

ai commented 11 months ago

Better UX, you UI is too complex to be used instead the current one