back to books

A Philosophy of Software Design

John Ousterhout★★★★2023-07-15

This book changed how I think about API surface area. Ousterhout argues that the best modules are "deep" — they hide significant complexity behind simple interfaces.

Key ideas

  • Deep modules: A simple interface hiding complex implementation is better than a shallow one that leaks details.
  • Tactical vs strategic programming: Taking the time to design properly pays off. Tactical coding accumulates complexity.
  • Define errors out of existence: Instead of handling every edge case, design APIs so errors can't happen.

The chapter on comments was the weakest — felt like it was written for a different audience. But the core ideas on complexity are worth revisiting regularly.