Complex is better than complicated

March 28, 2025

Key takeaway: Keep complexity only when you can name the requirement or failure it handles today, and remove the rest.

Complexity comes from the problem, and complication is what the solution adds. Accept the first when you can justify it, and refuse the second.

Some problems are hard. Distributed consensus is complex. A tax calculation across fifty jurisdictions is complex. You can’t simplify those without losing correctness. Complication is what you add on top: layers, premature abstractions, and indirection that serves no current purpose.

Warranted complexity solves a problem you actually have. Retry with jitter makes a loop harder to read, but one sentence justifies it: without the random delay, every client retries at the same instant and knocks the recovering server back over. Take it out and a failure you can name comes back.

Complication arrives through reasonable-sounding decisions. Add a layer so we can swap implementations later, and you never swap. Make it configurable for every team, and one team uses it. Build a plugin system just in case:

# orders.py: a plugin system with one plugin
from collections.abc import Callable

OrderHook = Callable[[Order], None]
_after_save_hooks: list[OrderHook] = []


def register_after_save(hook: OrderHook) -> None:
    _after_save_hooks.append(hook)


def place_order(order: Order) -> None:
    save_order(order)
    for hook in _after_save_hooks:
        hook(order)


# receipts.py: the only plugin anyone ever registered
register_after_save(send_receipt)

To learn what happens after an order saves, a reader has to search for every register_after_save. Remove the hooks and nothing breaks:

# orders.py
def place_order(order: Order) -> None:
    save_order(order)
    send_receipt(order)

To tell them apart, ask three things: can you explain it in one sentence, does removing it break something today, and did you add it for a problem you have or one you imagined?