liveBook · Manning

Complexity

As explained in The Coder Cafe

Complexity is the degree to which a problem or system has interacting, changing factors that make its behavior difficult to predict or solve.

Complexity describes systems or problems whose interacting factors make behavior difficult to predict or solve. Recognizing it matters because complex problems need adaptive approaches rather than automatically applying familiar solutions. section 6.14

Distinguish complexity from related sources of difficulty:

  • Complicated problems are intricate but predictable, with structured and repeatable solutions. section 6.14
  • Complex problems are intricate and unique, requiring novel solutions that adapt as conditions change. section 6.14
  • A technically challenging task is not necessarily complex: finding a nearby driver can use established techniques such as geo-hashing. section 6.14

Reduce avoidable complexity in software by:

  • Building current requirements instead of hypothetical features, abstractions, generics, unused code, or irrelevant optimizations. section 4.2
  • Improving readability through simpler conditions, less nesting, limited inheritance, and cohesive code. section 4.4
  • Keeping documentation clear and current, communicating requirements precisely, and reducing disruptive context switching. section 4.4
  • Apply YAGNI as a default, while making deliberate exceptions for architecture, anticipated growth, or regulatory compliance. section 4.2

Two matching problems

Efficiently matching a passenger with the nearest driver is technically difficult but can use established solutions. Scheduling machine-learning infrastructure at very large scale may require new paradigms and adaptive approaches. section 6.14

How The Coder Cafe covers it

How deep it goes
Defines complicated versus complex problems and gives navigation guidance, while deferring a full catalogue of complexity patterns.
Examples
Uses tax filing, climate change mitigation, driver matching, geo-hashing, and large-scale machine-learning infrastructure.
What it assumes
Assumes basic software engineering familiarity while defining the complicated-complex distinction and cognitive-load terminology.
What you can do after
Evaluate whether a problem needs a repeatable solution or an adaptive approach, then reduce avoidable software complexity.
How it connects
Connects complexity with YAGNI, cognitive load, software maintenance, abstractions, readability, and distributed systems.

Also explained in

Compare how 15 books explain complexity →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Coder Cafe. The section links point to the parts of the book it draws on.