This website uses cookies
Read our Privacy policy and Terms of use for more information.
design_patterns
Nov 1, 2026
•
6 min read
A decorator wraps an object in another object with the same interface. Here is how it behaves in production code, and the one design decision that bites: the order of the wrappers.
Oct 31, 2026
7 min read
The Adapter is the most common structural pattern and the one people rarely name. Here is what it is, where it hides in your stdlib, and how an adapter quietly turns into the thing it was meant to protect you from.
Oct 28, 2026
Dependency injection is a one-line idea that grew a framework industry around it. Here is the idea, the three ways it goes wrong in production, and when a container earns its place.
Oct 25, 2026
The Builder pattern is mostly a patch for languages without named arguments. Here is the part that is still worth writing in 2026: validation across fields, immutable results, and step-by-step construction.
Oct 22, 2026
Most factory code is an if-statement with a class name on it. Here is the one problem the pattern really solves, the two GoF versions, and the registry you will actually write.
Oct 16, 2026
5 min read
Singleton gets blamed for sins that belong to global state. Here is what the pattern actually guarantees, the one thing it gets wrong, and where "exactly one" is still the right answer.
+1
Oct 13, 2026
A sidecar gives every pod a free ops team in a second container. It also gives every pod a second container to pay for. Here is when the trade is worth it, how Kubernetes finally made it a first-class citizen, and why Istio built a mesh with no sidecars at all.
Oct 10, 2026
The rewrite plan sounds clean and fails most of the time. The strangler fig replaces a system one route at a time while it keeps earning money. Here is the routing layer, the data problem nobody mentions, and the verification trick that makes cutover boring.
Oct 7, 2026
A gateway gives your clients one address. A BFF gives each client its own backend. Most teams need the first, think they need the second, and build the wrong one in the wrong place.
Oct 4, 2026
8 min read
A saga trades away the one ACID property nobody tells you about, isolation, and the hard part is putting it back.
Jul 21, 2026
Storing the change instead of the result is the easy part. The bill comes due when you realize every event you have ever written is a public contract you can never take back.
Jul 12, 2026
CQRS is not two databases. It is one idea about splitting the model, and most teams end up paying for the expensive version when they only needed the cheap one.
Jul 9, 2026
Everyone means something different by "event-driven," and most production pain comes from two teams picking different meanings without noticing.
Jul 6, 2026
Microservices were never about size. They were about who can deploy without asking permission - and most teams copied the topology and skipped the one property that mattered.
Jul 3, 2026
Clean Architecture is one good rule wearing four rings of costume. Keep the rule. The costume is optional, and most teams pay for it without knowing why.
Jul 1, 2026
Ports and adapters is not a shape you draw or a folder layout you copy. It is a single rule about which way your dependencies point, and almost everyone who claims to use it has broken that rule.
Jun 27, 2026
Every greenfield service drifts into controller, service, repository. People call it boring three-tier and reach for something fancier. The boredom is the feature.
Jun 24, 2026
The MVC your web framework ships is not the MVC that Trygve Reenskaug wrote down in 1979. What mutated and what survived tells you what the pattern was actually for, and why the Controller keeps falling apart.
Jun 21, 2026
A design pattern is not reusable code. It's a name for a recurring shape that a good solution takes under pressure. Knowing the difference is what separates engineers who use patterns from engineers who get used by them.