6
Design: Structuring Systems That Stay Understandable
Structure is what lets a system keep changing without breaking.
Why it matters when agents do the typing
Code gets cheaper to produce every year, so complexity piles up faster than anyone can read it, and the team that owns the system still has to change it safely. Good structure (small interfaces, clear boundaries, each rule in one place) keeps a system understandable enough to verify. A well-bounded module can be understood, tested and replaced on its own.
-
Depth: do
Managing Complexity
Coupling, cohesion, information hiding and simplicity: the principles that decide whether a codebase gets easier or harder to change over time.
A mistake it teaches you to catch: A factory, an interface and a configuration loader added for a feature that has exactly one implementation.
-
Depth: explain
Components and Architecture
How a system is divided into modules and services, which way dependencies point, and how the parts communicate.
A mistake it teaches you to catch: Business rules written directly inside HTTP handlers or UI components, where they can't be reused or tested alone.
-
Depth: do
Interfaces and APIs
Designing the contracts between parts of a system and between systems: shapes, errors, versions and limits.
A mistake it teaches you to catch: A breaking change to a public API, such as a renamed field or changed type, shipped without a version or a migration path.
-
Core 11
Depth: do
Error Handling and Failure Paths
Deciding what happens when things go wrong: which errors to handle, which to pass up, and which should stop the program.
A mistake it teaches you to catch: A catch-all handler that logs the error and returns a default value, so failures look like successes.
-
Core 12
Depth: do
Where Logic Meets the Database
The boundary between application code and storage: where business rules live, what queries get generated, and how the two stay consistent.
A mistake it teaches you to catch: N+1 queries: one query for a list and then one more for every item, usually hidden inside an ORM's lazy loading.
-
Depth: explain
Frontend and Backend
Splitting responsibility between the user interface and the server: where state lives, where checks run, and how the two talk.
A mistake it teaches you to catch: Authorization, pricing or discount logic enforced only in the browser, where any user can change it.