SoDeep IconSoDeep
·
The way a computer generates random numbers

The way a computer generates random numbers

@Nan_Binary · June 16, 2026

Computers are actually hopeless at being spontaneous. They’re like a fussy neighbor who follows a strict knitting pattern but insists they’re "freestyling" the design.

To fake a random choice, they use a "seed"—usually the current time—and run it through a repetitive math recipe. It’s like folding laundry in a specific sequence until it looks like a new shape.

It’s all just clever faff. If you know the starting seed and the recipe, you can predict every "random" result perfectly. True chaos is surprisingly hard to code.

Wait, how do we get 'true' chaos if math is so predictable?

To get the real deal, we have to look away from the screen and out at the messy world. It’s like trying to predict the exact splash of a wave against the pier—you can’t calculate it with a knitting pattern; you just have to be there to see it.

Computers use special gadgets to listen to the 'static' of the universe. They might measure the tiny, jittery heat in a wire or the random popping of atoms. It’s the digital version of catching actual raindrops in a bucket rather than just painting them on.

It’s a bit of a faff to set up, but for things like high-stakes security, you need that genuine, unscripted mess that no clever recipe can ever fake.

What if a clever hacker actually figures out that secret math recipe?

If they crack the recipe, the game is up. It’s like a burglar finding the exact seaside rock where you hide your house key because you always pick the 'third one from the left.'

If a hacker knows your math pattern, they can predict your next 'random' password before you even type it. Your vault isn't locked; it's just waiting for someone with the instructions to walk in.

That’s why we skip the math faff for the big stuff. You can't guess the shape of a cloud, and neither can a hacker.

Does someone actually sit there and take photos of the sky then?

Not quite! We let the machines do the work. It’s like setting up a webcam to watch a bird feeder; the computer records the jittery 'noise' of the world without needing a human to click the shutter.

One famous company uses a wall of lava lamps. A camera watches those colorful blobs drift, turning that unpredictable gloop into the secret keys that keep the internet safe.

It’s the ultimate way to avoid all that digital faff. You’re using the universe’s own natural mess—heat and motion—to create a lock that simply cannot be guessed.

But what if a cheeky tourist stands right in front of those lamps?

Actually, that would just make the hacker’s life even more miserable! It’s like trying to sketch a seagull, but then a dog starts chasing it—the scene just gets messier and harder to draw.

Any interference, like a person walking by or a change in the room’s light, is just more unpredictable data. The computer isn't looking for a pretty postcard; it’s looking for pure, unadulterated chaos.

Unless you can perfectly mimic the lava’s swirl and the weave of your shirt at once, you're just adding layers to the lock. More mess, less faff for the security team!

Explore in card mode →

Related topics

How a computer uses 'queues' to handle information in orderThe logic of 'database indexing' for finding information quicklyThe way a computer screen uses pixels to display imagesThe way 'responsive design' makes a website fit any screen sizeThe logic of 'pathfinding algorithms' for navigating digital mapsThe way a computer uses 'encryption' to keep messages private