Skip to main content

Writing

Series

Multi-part posts that follow a single story from constraints to conclusions.

View all series

Series index

Track long-form arcs across the blog, grouped by topic and ordered by narrative flow.

1 series
3 posts
1 complete
Browse all series
· 6 min read

Splitmix32: Thirteen Lines of Beautiful Randomness

I went looking for a seeded PRNG in TypeScript and found splitmix32, a 32-bit pseudorandom number generator so elegant it made me want to understand every single bit.

· 12 min read

Barcode Scanners Are Keyboards With Extra Steps

From bars and spaces to keystrokes in your input field. How UPC-A barcodes encode data, how scanners decode them, and why your barcode reader acts like a keyboard.

· 8 min read

Investigating `createRequire is not a function`

A debugging journey through webpack internals, WebAssembly loading, and ESM edge cases. Four dead ends before finding the fix.

· 9 min read · Part 3 of 3

Stochastic Greedy: Scaling Submodular Maximization to Massive Datasets

Stochastic Greedy replaces greedy's full scan with random subsampling, reducing runtime from O(nk) to O(n ln(1/ε)) while losing only an additive ε in the approximation guarantee. This post covers the algorithm, its proof, and practical guidance.

· 13 min read · Part 2 of 3

The Greedy Algorithm for Submodular Maximization

The greedy algorithm achieves a (1 - 1/e) approximation for monotone submodular maximization, provably the best any efficient algorithm can do. This post covers the algorithm, its proof, Lazy Greedy, and when greedy fails.

· 15 min read · Part 1 of 3

An Introduction to Submodularity

A practical introduction to submodular functions, the mathematical framework behind diminishing returns, covering set functions, marginal gains, and real-world applications from sensor placement to influence maximization.

· 2 min read

Fixing "SDK Build Tools is Too Low" in React Native

A Gradle-based solution using afterEvaluate to permanently fix SDK Build Tools version mismatches across React Native Android dependencies.