Steven's Knowledge

Design

Structural rules and contracts that hold across modules — principles, boundaries, APIs, and simplicity

Design

The decisions that shape code above the level of a single function or class: how modules relate, what each one promises, and how to keep complexity from compounding.

Topics

  • Design Principles — SOLID, Law of Demeter, Tell-Don't-Ask, and structural rules.
  • Design by Contract — Preconditions, postconditions, invariants, and stating what correct means.
  • Boundaries — Working with third-party code and external services.
  • API Design — Public interfaces that are minimal, stable, and easy to use correctly.
  • Simplicity — The four rules of simple design and the cost of complexity.
  • Duplication — DRY, orthogonality, and the kinds of duplication that matter.
  • Architecture Decision Records — A lightweight format for capturing significant decisions — what was chosen, what was considered, and why.

On this page