Category Theory Illustrated — Orders: a friendly primer for coders and curious minds

April 18, 2026
Colorful magnetic numbers scattered around a file labeled 'TAXES', symbolizing financial organization.
Photo by Tara Winstead on Pexels

What is an order?

Category Theory Illustrated — the latest chapter on orders — walks readers through a deceptively simple idea: given a set of things, how do you decide which comes before which? The piece breaks the notion of order into two parts you already know from programming and math: a set of elements, and a binary relation between them. Sounds dry? Stick with it. The real action is in the rules that make a relation an “order”: reflexivity (everything relates to itself), transitivity (if a ≤ b and b ≤ c then a ≤ c), antisymmetry (a ≤ b and b ≤ a means a = b), and totality (any two things are comparable). Linear orders — think colors by wavelength or any strict ranking — satisfy all four.

Orders in code and in life

Programmers will nod. In code, an ordering function (a comparator) instantiates the same idea: give it two objects, it says which is “bigger.” But not every comparator defines a valid order. If your function breaks transitivity or antisymmetry, you get subtle bugs — flaky sorts, inconsistent sets, weird behavior in balanced trees. The article even leans on a human example for the emotionally resonant moment: if you’re better at soccer than your grandmother, and she’s better than her friend, then transitivity says you should beat that friend too. It’s a small, comforting truth. Or a scalpel — depending on whether your comparator obeys the laws.

Why this chapter matters now

This is more than a dry taxonomy. The tutorial ties abstract category-theory language to everyday programmer pain: comparator contracts, strict vs. non-strict orders, and how those abstract laws show up as real, brittle behavior in software. Want a practical takeaway? When you implement ordering, aim for consistency — reflexivity, transitivity, antisymmetry — or be ready for surprises. It has been reported that the series is drawing attention on Hacker News, and it’s easy to see why: clear diagrams, plain-language examples, and the kind of “aha” moment that turns an abstruse math topic into a toolkit you can use tomorrow.

Sources: abuseofnotation.github.io, Hacker News