5 ms·
> If you want the probability to be effectively zero, you should use 30 digits or so. You really don't need it to be effectively zero. Just significantly less
by corysama 4y ago
> If you want the probability to be effectively zero, you should use 30 digits or so.
You really don't need it to be effectively zero. Just significantly less than other sources of error. For 8 billion people, a 3% chance of there being single error somewhere on the whole planet is pretty good on the scale of issues that the QA team needs deal with. Especially when the fix is: Roll a second random number for that single unlucky person on Earth. That's pretty easily auto-detected and auto-fixed at generation time.
I worked on a big game that used 32-bit hashes of asset names even though we expected to get on the order of 10 collisions across the dataset. The solution was to detect collisions and tell artists to tweak their file names. Happened about 10 times over the course of many years and hundreds of thousands of assets.
- dboreham 4y agoHuman-implement hash bucket overflow.
- thfuran 4y agoIf everyone who's generating the numbers can query a global centralized database, why would they be random in the first place? Isn't the whole point of a system like uuid (which this seems to be leaning in the general direction of) to avoid that sort of thing being necessary?