ai / nanoid

A tiny (124 bytes), secure, URL-friendly, unique string ID generator for JavaScript

Home Page:https://zelark.github.io/nano-id-cc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More intuitive calculator?

olalonde opened this issue · comments

commented

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

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