Blog Logo
TAGS

Ideas from A Philosophy of Software Design

Almost a month ago, I created a telegram channel with the goal of reading tech books consistently, and sharing summaries of them. This week, I have finished reading the first book - A Philosophy of Software Design by John Ousterhout and shared all of the 21 chapter summaries in the channel. In this post, I will share what are the 3 ideas that resonated with me the most. The book is pretty packed with insights, and I think many junior-mid level software engineers can benefit from them, so I do encourage you to read it yourself! Idea 1: Zero-tolerance towards complexity On the second chapter of the book, the author describes what is complexity and what are its symptoms: Change amplification: a simple change requires changes in many different places. Cognitive load: the developer needs to learn a lot to complete a task. Unknown unknowns: it is not obvious which pieces of code need to change to complete a task. The author argues that complexity is not caused by a single error, it accumulates. Sometimes we convince ourselves that a bit of complexity here won’t matter much, but if everyone on the project adopts this mindset, the project will become complex rapidly. In order to slow the growth of complexity, you must adopt a zero-tolerance philosophy. Example Imagine a simple order processing system where you calculate shipping costs, and apply discounts. However, this system is poorly designed with duplicated logic across multiple services, leading to change amplification. Let’s say both the CheckoutService and the ShippingService use the same logic to calculate discounts, but it’s implemented separately in both places. Why is it bad? Change Amplification: If you want to modify how discounts are applied (e.g., introduce a new discount or change the criteria), you have to modify both CheckoutService and ShippingService. Cognitive Load: Developers must remember to update every part of the system that touches discounts. Forgetting to update one part (e.g., missing it in ShippingService) will lead to inconsistent behavior. Unk