Engineering Notes

Or: How I learned to stop worrying and love the Lambda Calculus.
Jan 04, 2026
Why QuickSort is O(n²) in the Worst Case (And Why You Should Care)

Most people assume n*log(n), but pivot selection matters. A look at median-of-three partitioning and how to avoid the deadly worst-case scenario in production systems.

Dec 21, 2025
Understanding Shannon Entropy in Data Streams

I've been analyzing the randomness of encrypted packets versus compressed data. It's fascinating how high-entropy noise resembles perfectly encrypted traffic. Here is a Python script to visualize the histogram of your /dev/urandom.

Nov 15, 2025
The Monty Hall Problem: A Bayesian Perspective

Humans are terrible at probability. Why switching doors increases your win rate to 2/3, explained with a simple simulation code.

Oct 30, 2025
Fast Inverse Square Root: The 0x5f3759df Magic

Revisiting the legendary Quake III Arena code. How bit-level manipulation of floating-point numbers works, and why we don't really need it anymore in modern CPUs.

Sep 12, 2025
Euler's Identity is Beautiful, But Have You Seen Fourier Transforms?

Deconstructing a square wave into infinite sine waves. A visual guide to FFT (Fast Fourier Transform) and its applications in signal processing.