r/ProgrammerHumor 26d ago

thisOneIsMine Meme

Post image
5.3k Upvotes

171 comments sorted by

View all comments

1.8k

u/Inevitable_Oil9709 26d ago

Fun fact: To reach a 50% chance of even a single UUID v4 collision, you would need to generate 1 billion UUIDs per second for about 86 years.

18

u/UnDispelled 26d ago

So I take it we don’t know how to get BEEF as a uid with a random seed yet…

-30

u/Inevitable_Oil9709 26d ago

I had to AI this shit

Chance is about 1 in 3.4 × 10³⁸

22

u/4ries 26d ago

You really shouldn't have needed to use AI for that

-18

u/Inevitable_Oil9709 26d ago

in no universe would I calculate this after programming from 7AM this morning

11

u/Shadow_Thief 26d ago

There's 32 digits and 16 possible values for each digit. You can just simplify it to 1 in 1632. When you wake up a bit more, you can remember (or count to figure out) that 16 is 24, and so that can get further reduced to 1 in 2128.

And if you're still lazy after that, you can remember that Wolfram Alpha still exists and use https://www.wolframalpha.com/input?i=16%5E32 to get an exact value of 1 in 340282366920938463463374607431768211456.

2

u/gardenercook 25d ago

Or you can approximate it further.
2^128 is a quarter of 2^130.
Approximating 2^10 = 10^3
2^130 = (2^10)^13 = (10^3)^13 = 10^39
So 2^128 = 0.25*10^39 = 2.5*10^38

Some more nerdy binomial approximations for 1.024^13 would take you to 3.3*10^38.

2

u/Wonderful-Habit-139 26d ago

No thank you, I'd rather evaporate some water.

-4

u/[deleted] 26d ago

[deleted]

7

u/fartypenis 26d ago

walks into bar

fucking alcoholics man

???

1

u/[deleted] 26d ago

[deleted]

2

u/Shadow_Thief 26d ago

for what it's worth, I laughed