A Philosophy of Software Design by John Ousterhout
A Philosophy of Software Design by John Ousterhout

Science · 2018

A Philosophy of Software Design

by John Ousterhout

4h 0m reading time

Open in Superbook

Summary

John Ousterhout's central claim in this book is that the greatest limitation in software development is our ability to manage complexity, and that almost every problem in large systems can be traced back to complexity that was unnecessary and could have been prevented. Ousterhout is a computer science professor at Stanford with decades of experience building systems software — he created the Tcl scripting language and the Raft consensus algorithm — and the book reads like an attempt to make explicit the design intuitions he has developed over that career.

The book's organizing concept is the distinction between deep and shallow modules. A deep module has a simple interface that hides a large amount of functionality — a file system call that lets you read a file in one line, regardless of the physical complexity beneath. A shallow module has nearly as complex an interface as its implementation, which means it doesn't do much to reduce the cognitive load of using it. Ousterhout argues that most complexity in systems comes from shallow modules, from leaking implementation details through interfaces, and from incremental design decisions that each seemed reasonable but together made the system harder to understand.

The second major thread is what Ousterhout calls "tactical versus strategic programming." Tactical programmers optimize for getting things working quickly. Strategic programmers invest in clean design even when it slows them down in the short term, because they know that complexity compounds. He argues that the investment is worth it — that the time spent thinking carefully about interfaces pays back many times over. This is easy to say and harder to institutionalize, because most software development environments reward shipping, not tidiness.

The book is compact at around 200 pages. Some reviewers have pushed back on specific prescriptions — particularly the advice to prefer fewer and longer comments rather than many short ones, which runs against some established conventions. And Ousterhout is unabashedly prescriptive: he has opinions, and he states them as principles. Readers who want a balanced survey of design approaches will be frustrated. But for developers trying to articulate why some code feels clean and some doesn't, and how to improve deliberately, the book provides a vocabulary and a framework that is hard to find elsewhere at this level of concision.

A Philosophy of Software Design by John Ousterhout
A Philosophy of Software Design by John Ousterhout

Talk to A Philosophy of Software Design like its author wrote you back.

Get the ideas that fit your life — not generic summaries.

  • Chat with the book
  • Audiobook-style main ideas
  • Adapts to your life and goals
  • Helps you take action
Open in Superbook

Key takeaways

  1. 1.

    Complexity is the root cause of most software failures. Managing it is the central task of software design, not a side concern.

  2. 2.

    Deep modules have simple interfaces that hide a large implementation. Shallow modules expose nearly as much complexity as they contain, providing little abstraction value.

  3. 3.

    Information hiding is the most powerful technique for reducing complexity. If a module knows less about other modules, changes are less likely to cascade.

  4. 4.

    Tactical programming — optimizing for short-term speed — creates the technical debt that makes systems hard to change. Strategic programming invests in clean design upfront.

  5. 5.

    Interfaces should be designed to make the common case simple, not to expose all the power of the implementation. Complexity should live in the implementation, not the interface.

  6. 6.

    Comments should describe things that aren't obvious from the code — the why, not the what. Good comments reduce cognitive load on future readers, including yourself.

  7. 7.

    Pass-through methods and shallow wrappers are design smells. If a class does little more than delegate to another, it's adding interface complexity without hiding implementation complexity.

  8. 8.

    The best time to think about design is before you write the code. Ousterhout recommends writing the interface comments before the implementation to force clarity about what a module should actually do.

Discussion questions

Use these on your own, with a book club, or as chat starters in Superbook.

  1. 1.

    Ousterhout says complexity is almost always the result of incremental decisions that each seemed fine. Can you think of a codebase where this has played out, including systems you've worked on?

  2. 2.

    The distinction between deep and shallow modules is appealing in theory. What makes it hard to apply consistently in practice, especially under time pressure?

  3. 3.

    Ousterhout is openly prescriptive — he has strong opinions about comments, error handling, module design. Does that strengthen or weaken the book's usefulness as a reference?

  4. 4.

    The book argues for strategic programming even in early-stage startups. Do you find that convincing? Where does design investment pay off quickly versus when does it genuinely not matter yet?

  5. 5.

    He argues that the best interface is one that makes the common case simple, even if it obscures edge cases. Are there situations where that tradeoff goes wrong?

  6. 6.

    Ousterhout criticizes the convention of writing many short comments. Where do you land on commenting style, and has your view changed after reading this?

  7. 7.

    The book is specifically about systems software. How much of its advice transfers cleanly to application code, frontend development, or data pipelines?

  8. 8.

    Information hiding is the book's core technique. What are situations where hiding information actually creates problems — where the abstraction makes debugging harder or causes surprising failures?

  9. 9.

    Ousterhout's examples are mostly drawn from his own systems work. Would the book's arguments be more or less convincing with a broader range of examples?

  10. 10.

    The book was revised to a second edition fairly quickly after the first. What does it say about a design philosophy book that the author felt the need to refine it?

  11. 11.

    If you were teaching a software design course, which single idea from this book would you put at the center of the syllabus?

  12. 12.

    Ousterhout distinguishes between mistakes that can be fixed gradually versus foundational ones that poison a codebase. How do you identify which type you're dealing with when you inherit existing code?

Themes

Frequently asked questions

  • Is A Philosophy of Software Design worth reading for experienced engineers?

    Yes, especially if you want a vocabulary for design conversations rather than new techniques. Most experienced engineers recognize what Ousterhout describes; the value is having precise terms like 'deep vs. shallow modules' for discussing tradeoffs in code reviews and architecture discussions.

  • How does this book compare to Clean Code by Robert Martin?

    Both address code quality but at different levels. Clean Code focuses on line-by-line habits: naming, function size, formatting. Ousterhout focuses on module and system design. They're complementary. Ousterhout is more opinionated and more willing to contradict established conventions.

  • What is a deep module according to Ousterhout?

    A module with a simple interface that hides a large implementation. The Unix file I/O system is his canonical example: a handful of system calls abstract away enormous complexity. Shallow modules expose nearly as much as they implement and don't reduce cognitive load.

  • Who should read A Philosophy of Software Design?

    Software engineers who write or review systems code and want to reason more clearly about design decisions. Less useful for beginners who haven't yet encountered the kinds of complexity the book diagnoses. Also worth reading for engineering managers who want to articulate why some designs cause problems downstream.

  • Is the second edition significantly different from the first?

    The second edition adds a chapter on comments and refines some arguments based on reader feedback. The core ideas are the same. If you've read the first edition the additions don't require re-reading the whole book.

About John Ousterhout

John Ousterhout is a professor of computer science at Stanford University and the creator of the Tcl scripting language and the Raft distributed consensus algorithm. He spent years in industry at Sun Microsystems and co-founded Electric Cloud before returning to academia. His research spans distributed systems, operating systems, and software engineering. A Philosophy of Software Design grew directly from a software design course he developed at Stanford. He is one of the relatively few academic computer scientists who writes directly for a practitioner audience.

More books by John Ousterhout

Similar books

Chat with A Philosophy of Software Design

Ask questions. Adapt it to your life. Get answers based on your goals.

Download on the App Store