portfolio - personal site

Brayden Hord

Director of Engineering & Innovation. I build production AI systems by day and weird, mathy toys by night - most of which live on this site. Click around, generate some randomness, race the lights.

A brief tour

Below: a small playground of randomness experiments. They're toys, but the math is honest. If you'd like to sit and stare, click below to enjoy Conway's Game of Life as the background instead.

Random Password Generator

This generator pulls bytes from window.crypto.getRandomValues() when available - the browser's CSPRNG, suitable for security-sensitive use - with rejection sampling so the modulo doesn't bias the character distribution. It falls back to Math.random() only if crypto is unavailable.

Modern V8/SpiderMonkey actually implement Math.random() with xorshift128+, so the output is high-quality statistically - but it's not cryptographically secure: the internal state can be reconstructed from a handful of outputs. Don't use it for tokens, secrets, or anything an attacker would benefit from predicting.

Randomize an Array

Fisher-Yates shuffle backed by a uniform integer generator on top of crypto.getRandomValues() (with rejection sampling so each permutation is equally likely). Takes a comma- or space-separated list and returns a fair shuffle.

Math.random() plot

Plot of points $(x, y)$ where both coordinates come from Math.random(). The plot runs in O(n) per call - constant work per sample.

With $n = 250$ points the four quadrants of $[0,1]^2$ won't have exactly the same count even from a perfect uniform RNG; that's a property of random sampling, not a flaw of the generator. The Law of Large Numbers makes the imbalance shrink as $n$ grows.

32-bit XORShift plot

Same plot, but using a small xorshift generator (Marsaglia 2003) seeded once from crypto.getRandomValues(). It's the x ^= x << 13; x ^= x >> 17; x ^= x << 5; recurrence - fast, statistically decent at short lengths, and a useful baseline for comparison.

For full statistical evaluation, use the NIST-style testing kit.

This page uses MathJax for inline LaTeX. You can right-click on equations or symbols to access an alternate-rendering dialog if your browser is having a bad time.

Inline equation: \( x^2 + y^2 = z^2 \)

Displayed equation:

\[ \int_0^\infty e^{-x^2}\, dx = \frac{\sqrt{\pi}}{2} \]