Design Patterns
Reusable solutions at code level, and when they become ceremony.
4 to work through
-
intermediate
A codebase uses many design patterns and is harder to understand than an equivalent one that uses few. What went wrong?
2 min answer -
intermediate
When does introducing a design pattern make a codebase worse?
2 min answer -
advanced
A collaborative whiteboard supports hundreds of concurrent editors on one board. Compare OT and CRDT for a canvas with object hierarchies, and describe board sharding and catching up after ten minutes offline.
3 min answer -
advanced
At 09:14 a document-processing platform of JetBrains' shape starts returning wrong results for about 3% of requests. No errors, no latency change. The stack traces contain three frames of framework code and a lambda. It takes eleven hours to find. The code is a textbook strategy-and-registry design. What made this undiagnosable, and which design decision would you change?
2 min answer
3 terms in this topic
Design Patterns
Named solutions to recurring design problems — valuable primarily as shared vocabulary, and harmful when applied as a goal.
conceptPattern Overuse
Applying a design pattern where the problem it solves does not exist, adding indirection and vocabulary without benefit.
conceptSpeculative Abstraction
Structure added for variation that has not occurred - paying certain indirection now for a benefit that depends on a guess about the future.
Neighbouring topics
Software Architecture
General material on the engineering underneath an architecture.
SOLID
Five design principles, two of which scale beyond the class.
Domain-Driven Design
Ubiquitous language, bounded contexts and context mapping.
Bounded Contexts
Where one model ends and another begins, and why forcing one fails.
Clean Architecture
Concentric layers with dependencies pointing only inwards.
Hexagonal Architecture
Ports defined by the domain, adapters supplied by infrastructure.
Microservices
Independent deployability, and the distributed problems it buys.
Modular Monolith
Enforced internal boundaries without a network between them.
Service Boundaries
Drawing lines along change patterns rather than technical layers.
Refactoring
Changing structure without changing behaviour, in verified steps.
Technical Debt
Deliberate, tracked and repaid — as distinct from mess.
Testing Strategies
The pyramid, and the contract tests distributed systems add to it.
Contract Tests
Capturing what consumers actually use, not what the API documents.
CI/CD
Continuous integration and delivery, and the architecture that caps them.
Release Strategies
Blue-green, canary, shadow and progressive delivery.
Feature Flags
Decoupling deploy from release, with an expiry date.
Trunk-Based Development
Short-lived branches, and unmerged work as inventory.
Code Review
Where architectural rules are enforced by people rather than by tools.
DORA Metrics
Throughput and stability moving together rather than trading off.