NIKHEDONIA
Mathematics · Algorithms · Engineering
Distributed Systems··13 min read
Raft: Consensus, Visualized
An interactive deep-dive into the Raft consensus algorithm — leader election, log replication, snapshots and truncation — with two live simulations you can explore and break.
Also In This Issue
The Abelian Sandpile: A Group Hiding in a Pile of Sand
The Bak–Tang–Wiesenfeld sandpile model (ASM) is a deceptively simple cellular automaton that conceals a rich algebraic structure — an abelian group whose identity element is a non-trivial fractal-like configuration.
Automatic Differentiation
A deep-dive into automatic differentiation: symbolic vs. numerical vs. AD, AST transformation, dual numbers, tapes, hybrid methods, and a generic C++ implementation that computes gradients and solves optimisation problems.
Detecting Hallucinations in LLM Summaries
LLMs write convincingly but fabricate facts. A practical tour of automated detection techniques: BERTScore, embedding similarity, ROUGE/n-gram overlap, NER-based cross-referencing, and QAEVAL.
◆ Interactive Feature
Hamilton: A Phase-Space Playground
Type a Hamiltonian or Lagrangian, integrate it in the browser, and watch an entire phase space evolve. A WebGL2 playground with RK4, symbolic derivatives and 21 built-in systems.
Read full article →Interactive Features
Hamilton: A Phase-Space Playground
Type a Hamiltonian or Lagrangian, integrate it in the browser, and watch an entire phase space evolve. A WebGL2 playground with RK4, symbolic derivatives and 21 built-in systems.
3 min readConformal Maps: When Complex Functions Preserve Angles
A conformal map preserves angles: near every point it behaves like a rotation followed by a uniform scaling. Explore them in a playground that warps grids and images — written with complex numbers, 2D vectors, and dual numbers.
15 min readEML: One Operator Is All You Need
How a single binary operator — eml(x,y) = exp(x) − ln(y) — can generate every elementary function a scientific calculator knows, from addition to trigonometry.
9 min readThe Challenges of WebGL
WebGL lets you run shaders in the browser — and that's genuinely magical. But using it for arbitrary GPU computation quickly reveals a thicket of constraints that OpenCL and WebGPU were designed to escape.
12 min readModern Portfolio Theory and the Efficient Frontier
Markowitz's mean-variance framework in one picture: why correlation, not just volatility, determines what a portfolio can achieve — and why the frontier is a map, not a money machine.
10 min readShannon's Demon: Volatility Harvesting and the Loss Bias of Leverage
A fair coin that moves ±10% a round already loses 0.5% a round. Rebalancing half against cash cuts that loss; a small edge turns it into a positive harvest. The same arithmetic explains why leveraged ETFs bleed.
9 min readThe Kelly Criterion: How Much to Bet When You Have an Edge
Sixty-one finance professionals, a coin that lands heads 60% of the time, and a formula for bet sizing. Why maximizing expected value can bankrupt you, why 20% beats 40%, and why most professionals bet half Kelly.
10 min readThe Order Book: How Price is Actually Born
A hands-on look at how a limit order book works — matching engines, price discovery, support and resistance zones — with a live simulation you can drive yourself.
9 min readGenerating Fake Stock Charts: From Random Walks to Order Books
A deep dive into synthetic stock price generation — from naive coin-flip random walks, through Gaussian distributions and fat tails, to a simulated order book — and how candlestick pattern analysis reveals the gap between each model and reality.
16 min read◆ Interactive Feature
The Bertrand Paradox: When Randomness Needs a Definition
A deceptively simple question — what is the probability that a random chord of a circle is longer than the side of its inscribed equilateral triangle? — has three different correct answers depending on what 'random' means.
Read full article →More Interactive Features
The Bertrand Paradox: When Randomness Needs a Definition
A deceptively simple question — what is the probability that a random chord of a circle is longer than the side of its inscribed equilateral triangle? — has three different correct answers depending on what 'random' means.
6 min readWhy Tuning a Piano is Mathematically Impossible
Perfect harmony is a mathematical impossibility. Here's the beautiful, maddening reason why — and how piano tuners have learned to live with it.
9 min readFrom Regex to Automata to Generators
How regular expressions compile to deterministic finite automata — with an interactive visualizer, a DFA-powered string generator, and a note on closing the loop with property-based testing.
9 min readThe Fourier Transform: From Sines to Signals
A visual and mathematical journey through one of the most beautiful ideas in all of mathematics — decomposing any signal into its frequency components.
15 min readmi-align: Brute-Force Affine Alignment on the GPU
A technical note on brute-force affine alignment: canonical coordinates, NCC and mutual-information scoring, when feature matching fails, and a WebGPU compute kernel that scores a whole grid of transforms at once.
10 min readReact vs SolidJS: Dynamic Graphs, Static Graphs, and the Price of Flexibility
React and SolidJS share JSX syntax but are built on fundamentally different computational models. Understanding why illuminates a much older tension in functional programming — and an eerily similar split that once divided PyTorch from TensorFlow.
9 min readFuzzy Search: Typos, Tries, and the Algorithms Behind Instant Results
A deep dive into how fuzzy search works — from edit distance and tries to stemming, BK-trees, and how Lucene/Elasticsearch find typo-tolerant matches at scale.
11 min readPerfect Hash Functions: Collision-Free by Design
A deep dive into perfect hash functions — what they are, why they matter, how to find one efficiently with parallel search, and how they compare to JavaScript's built-in Map.
8 min read
A turn-based game born from pen-and-paper lectures. Draw lines to move the ball into your opponent's goal — bouncing off walls and previous lines makes every match more chaotic than the last.

A pipe-rotation puzzle inspired by graph theory. Connect all sources to all sinks by rotating segments. Puzzles are procedurally generated via a maze-like algorithm.

Matrix inversion in disguise. Reduce the grid to the identity using elementary row operations — without realising you're doing linear algebra.
From DIY Monorepo to Nx: Lessons from a White-Label Credit Card Platform (2024)
Part 2 of a multi-year migration case study. After building a homegrown monorepo toolchain, we adopted Nx — and discovered that its opinionated approach solves some problems elegantly while creating new ones when your apps can't truly be isolated.
Solving the Wrong Problem: Knapsack vs. Distributed Worker Queues
We cut a 45-minute CI pipeline to 12 minutes by measuring every task and solving a knapsack problem to distribute builds across GitHub Actions workers. It worked. It was also the wrong problem: a static assignment is a bet placed before the run, and it cannot stay optimal once the run has better information.
From Legacy to Monorepo: Migrating a White-Label Credit Card Platform (2021–2024)
A four-year case study of migrating a white-labeled credit card platform from a legacy Angular/C# stack to a React monorepo with single-spa — covering GraphQL BFFs, micro-frontends, build parallelization, and the people problems that matter more than the tech ones.