Free sample lesson · A Philosophy of Software Design

Complexity Fundamentals

Why do software projects that start simple become nightmares to maintain?

Lesson 1 of the Wondering course A Philosophy of Software Design

Why Complexity Matters

Software projects often start simple, then become difficult to maintain.

As software evolves and grows, more structure must fit together. Developers need to understand that structure before changing it.

Complexity becomes the main limit on what developers can safely understand, modify, and maintain.

A project may work today yet still become harder to change tomorrow. Managing complexity early supports long-term success.

How Complexity Grows
  • Simple start: A project begins with a structure that is easy to understand.
  • Growing structure: As the software evolves, more parts must fit together.
  • Harder changes: Developers must understand more structure before changing the system.
  • Maintenance limit: Complexity limits what developers can safely understand, modify, and maintain.

Defining Software Complexity

Complexity is anything in a software system’s structure that makes the system hard to understand or modify.

The problem may involve how parts connect, where behavior lives, or how many details a developer must track.

For example, a small change can become risky when its effects are difficult to predict.

Complexity is not measured only by code size. A smaller system can still be complex if its structure is unclear.

Where Complexity Comes From

Make Code More Obvious

One way to fight complexity is to make code simpler and more obvious.

Clear structure helps developers understand what each part does and how a change may affect the system.

This approach reduces the amount of information a developer must hold in mind.

Small choices matter because complexity accumulates incrementally. Many confusing decisions can compound into an unmanageable system over time.

Making Code More Obvious
  • Choose clearly: Use small, clear choices so the code is simpler and more obvious.
  • Show structure: Make it easier to see what each part does and how changes may affect the system.
  • Reduce mental load: Clear structure reduces the information a developer must hold in mind.
  • Prevent compounding: Avoiding many confusing decisions keeps complexity from accumulating into an unmanageable system.

Encapsulate Through Modules

A second strategy is modular design, which places related details inside separate modules.

A module can hide internal complexity while exposing only what other parts need to use.

This approach limits how much of the system a developer must understand before making a change.

The practical goal is simple: minimize the code and structure developers must consider. Use clearer code, useful boundaries, or both.

Complexity Behind Module Boundaries

Check yourself

Software complexity is determined strictly by the size and line count of a codebase.

  • True
  • False

Answer: False

Complexity is driven by how hard a system's structure is to understand and modify, not solely by code size. A small system can still be complex if its structure is unclear.

Developers manage software complexity using two main approaches: _____ reduces the information a developer must hold in mind, while _____ hides internal details behind clear boundaries.

Answer: Developers manage software complexity using two main approaches: making code obvious reduces the information a developer must hold in mind, while modular design hides internal details behind clear boundaries.

Making code simpler and more obvious reduces individual cognitive load, whereas modular design encapsulates related details into separate components.

Why does complexity tend to compound over time in software projects?

  • Many small confusing design decisions accumulate incrementally.
  • Modular boundaries naturally break down as team size grows.
  • Code size automatically increases the execution overhead.
  • Developers intentionally write complex algorithms for performance.

Answer: Many small confusing design decisions accumulate incrementally.

Complexity accumulates incrementally because small, confusing choices made during development compound together over time into an unmanageable system.

Keep going

This is lesson 1 of 25 in A Philosophy of Software Design. Next up:

  1. Complexity Symptoms
  2. Strategic Programming
  3. Deep Modules
  4. General-Purpose Modules
  5. Different Abstractions

Start this course free

Wondering turns any topic into short lessons you can read, watch, or listen to, with practice questions and an AI tutor.