Book Review – A Philosophy of Software Design by John Ousterhout

“A Philosophy of Software Design” by John Ousterhout is a short and thought-provoking book about practical software development.

Key Concept

The book starts with a bold claim – the most critical job of a software engineer is to reduce and manage complexity.

Mr. Ousterhout defines complexity as “anything related to the structure of a software system that makes it hard to understand and modify the system.”

This definition serves as a motivating principle for the book. The author explores where complexity comes from and how to reduce it in a series of short chapters, which often include real-world code examples.

My well-thumbed copy of the book

Summary

The book starts with identifying the symptoms of complexity:

  1. The difficulty in making seemingly simple changes to a system.
  2. Increasing cognitive load – i.e., a developer’s ability to understand a system’s behavior.
  3. The presence of “Unknown unknowns” – undocumented and non-obvious behavior.

Mr. Ousterhout states that there are two leading causes of complexity in a software system:

  1. Dependencies – A given piece of code cannot be understood or modified in isolation
  2. Obscurity – When vital information is not apparent. Obscurity arises due to a need for more consistency in how the code is written and missing documentation.

To reduce complexity, a developer must focus not only on writing correct code (“Tactical Programming”) but also invest time to produce clean designs, and effective comments and fix problems as they arise (“Strategic Programming”).

The book provides several actionable approaches to reducing complexity.

Some highlights:

  • Modular design can help encapsulate complexity, freeing developers to focus on one problem at a time. It is more important for a module to have a simple interface than a simple implementation.
  • Prevent information leakage between modules and write specialized code that implements specific features (once!).
  • Functions (or modules) should be deep – and developers should prioritize sound design over writing short and easy-to-read functions.
  • Consider multiple options when faced with a design decision. Exploring non-obvious solutions before implementing them could result in more performant and less complex code.
  • Writing comments should be part of the design process, and developers should use comments to describe things that are not obvious from the code.

The book concludes with a discussion of trends in software development, including agile development, test-driven development, and object-oriented programming.

Conclusion

“A Philosophy of Software Design” is an opinionated and focused book. It provides a clear view of the challenges of writing good code, which I found valuable.

Mr. Ousterhout provides actionable advice for novice and experienced developers by focusing on code, comments, and modules.

However, the book is also relatively low-level. The book contains little discussion around system design, distributed systems, or effective communication (outside of good code and effective comments).

While books such as “The Pragmatic Programmer” provide a more rounded approach to software engineering, I admire that Mr. Ousterhout sticks to the core concepts in his book.

Book Review: “Artificial Intelligence – A Guide for Thinking Humans” by Melanie Mitchell

Artificial Intelligence – A Guide For Thinking Humans

Introduction

Melanie Mitchell’s book “Artificial Intelligence – A Guide for Thinking Humans” is a primer on AI, its history, its applications, and where the author sees it going. 

Ms. Mitchell is a scientist and AI researcher who takes a refreshingly skeptical view of the capabilities of today’s machine learning systems. “Artificial Intelligence” has a few technical sections but is written for a general audience. I recommend it for those looking to put the recent advances in AI in the context of the field’s history.

Key Points

“Artificial Intelligence” takes us on a tour of AI – from the mid-20th century, when AI research started in earnest, to the present day. She explains, in straightforward prose, how the different approaches to AI work, including Deep Learning and Machine Learning, based approaches to Natural Language Processing. 

Much of the book covers how modern ML-based approaches to image recognition and natural language processing work “under the hood.” The chapters on AlphaZero and the approaches to game-playing AI are also well-written. I enjoyed these more technical sections, but they could be skimmed for those desiring a broad overview of these systems. 

This book puts advances in neural networks and Deep Learning in the context of historical approaches to AI. The author argues that while machine learning systems are progressing rapidly, their success is still limited to narrow domains. Moreover, AI systems lack common sense and can be easily fooled by adversarial examples. 

Ms. Mitchell’s thesis is that despite advances in machine learning algorithms, the availability of huge amounts of data, and ever-increasing computing power, we remain quite far away from “general purpose Artificial Intelligence.” 

She explains the role that metaphor, analogy, and abstraction play in helping us make sense of the world and how what seems trivial can be impossible for AI models to figure out. She also describes the importance of us learning by observing and being present in the environment. While AI can be trained via games and simulation, their lack of embodiment may be a significant hurdle towards building a general-purpose intelligence.

The book explores the ethical and societal implications of AI and its impact on the workforce and economy.

What Is Missing?

“Artificial Intelligence” was published in 2019 – a couple of years before the explosion in interest in Deep Learning triggered due to ChatGPT and other Large Language Models (LLMs). So, this book does not cover the Transformer models and Attention mechanisms that make LLMs so effective. However, these models also suffer from the same brittleness and sensitivity to adversarial training data that Ms. Mitchell describes in her book. 

Ms. Mitchell has written a recent paper covering large language models and can be viewed as an extension of “Artificial Intelligence.”

Conclusion

AI will significantly impact my career and those of my peers. Software Engineering, Product Management, and People Management are all “Knowledge Work.” And this field will see significant disruption as ML and AI-based approaches start showing up. 

It is easy to get carried away with the hype and excitement. Ms. Mitchell, in her book, proves to be a friendly and rational guide to this massive field. While this book may not cover the most recent advances in the field, it still is a great introduction and primer to Artificial Intelligence. Some parts of the book will make you work, but I still strongly recommend it to those looking for a broader understanding of the field.

The Psychology of Money – Morgan Housel

The Psychology of Money

I read Morgan Housel’s “The Psychology of Money” towards the end of last year. I found it an insightful book that took a more personal and nuanced look at money and building wealth. It is not a “how to get rich quick book.” 
Its core advice is to take advantage of compounding and take a reasonable approach to risk — hardly rocket science. However, it explores some of the more common pitfalls and anti-patterns when people think of money. 
While I would strongly recommend everyone to read the book — it is fantastic, here is a quick summary of my notes from reading (and enjoying) the book. I hope you find it helpful!


A more personal view of money

People think of money as an abstract. We think about and are taught about money like we are taught physics. We assume that money is governed by rules and laws. Yet, psychology, with its study of emotions and nuance, may offer a better way to think about money.

Most people make financial decisions by taking the information that they have access to and plugging it into their mental model of how the world works. But these mental models are driven profoundly by personal experience.

Mr. Housel’s book takes a personal and intimate approach to understand how money works and illuminates some of the difficulties we face when making money decisions.


How to get rich and stay rich

Compound growth is the key to growing wealth. There is plenty of material available that describes viable strategies for becoming wealthy. However, Mr. Housel states that there is only one way to stay wealthy — “some combination of frugality and paranoia.”

If one can stick around for a long time without wiping out or being forced to give up, the power of compounding comes into play and helps generate wealth.

The key to a successful investment strategy is to not risk what you have and need for what you don’t have and don’t need.


The importance of sensible optimism

Successful investors take an optimistic view that, in the long run, the odds are in their favor, and over time things will balance out to a good outcome even if what happens in between is filled with misery.

But the optimism must be balanced with a healthy dose of paranoia. This means accepting nuance and understanding that the key to exploiting long-term optimism is survival.

It is critical not to get swept up in short-term momentum or get giddy about short-term gains or losses. The most effective long-term strategy is to not get overly influenced by short-term events.


Understanding wealth

When most people think about becoming a millionaire, they think of the ability to spend a million dollars. However, the true meaning of wealth is the ability to deploy money towards living a life that lets you do what you want, when you want, with who you want, where you want, for as long as you want. So, true wealth is financial assets that haven’t yet been converted into consumption.

The ability to save is also critical to building wealth. Savings are a hedge against life’s inevitable ability to surprise the hell out of you at the worst possible moment. The most potent way of increasing savings is not to raise your income but to raise your humility.


Making reasonable financial decisions

Financial decisions making is thought of as making coldly rational decisions in the light of available information and knowledge of the past. However, history is primarily the study of unanticipated events.

Therefore, relying on history as an unassailable guide to the future is risky. It is important to consider the past but to look at it in terms of generalities.

So, one must not be overly influenced by history and take a reasonable and pragmatic approach when making financial decisions. Having savings gives a buffer to absorb short-term volatility. Having a realistic and flexible approach to financial decisions makes it likely to stick with your investment strategy in the long run.


The role of skill and of luck

Money constantly changes returns. If an asset has momentum, a group of short-term traders will assume it will keep moving up. We have seen this play out in recent times with the GameStop saga.

It is not an unreasonable strategy for the short term. Executing such short term strategy doesn’t really require much skill but does need some luck in timing the strategy just right. Plenty of traders both lost and made huge amounts of money trying to time their GameStop trade. It was all about momentum.

The mistake we are susceptible to is focusing solely on what we want to do and have the ability to do. We ignore the plans and skills of others whose decisions might affect our outcomes. We also focus too much on the causal role of skill and neglect the role of luck. This makes us overly confident in our beliefs.

Cultivating Range: Lessons for Startups in a Wicked World

Introduction

I recently read David Epstein’s book Range: Why Generalists Triumph in a Specialized World. The book focuses on how to cultivate broad thinking strategies to learn effectively. Epstein’s focus is on individuals. As I made my way through the book, I saw that the points made in this book apply equally well to teams.

Range by David Epstein

I work with and advise early stage technology startups. I learnt a lot while reading “Range”. In this post, I explore how the lessons from “Range” can benefit technology startups or teams looking to launch a new product.


Thriving in Wicked Environments

Epstein introduces the concept of Kind and Wicked environments. A chessboard is a kind environment: the rules are clear, and actions are deterministic. Strategies that work in one situation should work well in similar cases. However, in the real world there are feedback loops and second-order consequences that are difficult to predict. It is a rapidly changing Wicked environment. Strategies that worked well in the past can stop working due to changes to the external environment or the market’s reaction to your previous actions.

We see this pattern repeatedly in the world of startups. Ideas that seem destined for success fail because they attempt to solve a problem that is no longer important or serve a market that no longer exists.

To thrive in a Wicked environment, a team may need to take conceptual knowledge from one problem domain and apply it to an entirely new one. The ability to think broadly and to be able to deploy flexible solutions to complex problems could be the difference between a successful product launch and complete failure.


Creating Innovative Products Through Analogical Thinking

Epstein describes Analogical Thinking as —

“The practice of recognizing conceptual similarities in multiple domains or scenarios that may seem to have little in common on the surface.”

Barriers to entry in the information economy are low. While anyone can launch a software product or service, successful companies frequently bring together ideas from different fields to build a compelling product.

Uber brought together logistics, mapping, mobile experiences, and access to an entirely new labor market to create a transformational service. Snowflake’s recent success is another example of a business built on the convergence of industry and technology trends. They successfully executed a simple, in hindsight, idea — cloud-only data warehouses.


Building a Successful Team

In Superforecasting, Philip Tetlock quotes the Greek poet Archilochus: “the fox knows many things, but the hedgehog knows one big thing.” Hedgehogs are specialists — they love to focus on one problem and usually work within their specialty’s confines. Foxes tend to work across various disciplines and work under ambiguity and contradictory conditions.

Epstein cites Tetlock’s research in forecasting and shows that in the face of uncertainty, individual breadth is critical. Similarly, teams that were open-minded and embraced a wide range of experience outperformed teams of narrow specialists.

A Team of Foxes may be more effective in a startup

Early-stage teams need to be open-minded and willing to change their assumptions and pivot when circumstances demand it. As a company matures, it may become useful to include specialists to refine a product and idea. However, having too many specialists at an early stage could lead to tunnel vision.


Choosing a Technology Stack

Gunpei Yokoi was a legendary video game designer at Nintendo. He designed the Game Boy. In Range, Epstein talks about Yokoi’s concept of “Lateral Thinking with Withered Technology.”

The heart of his philosophy was putting cheap, simple technology to use in ways no one else considered. If he could not think more deeply about new technologies, he decided, he would think more broadly about old ones.

You can still see this philosophy in play at Nintendo today.

The Nintendo Gameboy — A Lateral Application of Withered Technology

This lesson is of particular importance for startups with technical founders. It is tempting to be on the cutting edge of technology. But few customers will pay to use a product because it uses a fashionable technology stack. The ability of the company to solve the customer’s problem is way more important.

It may be more productive and faster to build a product using battle-tested, well-understood technology that is quickly and cheaply available. Just like Nintendo, a startup must cultivate a relentless focus on delighting the customer. Technology choices should come second.


Deploying Data Carefully

Startups are encouraged to be data-driven. They optimize for metrics such as customer behavior metrics, sales funnels, infrastructure costs, etc. The danger for the startup here is relying too much on data to make decisions without considering the market or whether the data is relevant to the vision of the company. As Epstein says — the critical question to ask is:

‘Is this the data that we want to make the decision we need to make?’

A dogmatic data-driven approach may lead to doing the same thing in response to the same challenges over and over until the behavior becomes so automatic that it is no longer recognized as a situation-specific tool.

An over-reliance on data can lead to actions that may improve the metrics the team relies on, but may not help the company in the long run to achieve their strategic objectives.


Making the most of External Advisors

Formal or informal advisors can play a critical role to the founding team in a startup. The most effective advisors are outsiders who may be removed from the company’s problem but may help reframe the problem that unlocks the solution.

Epstein notes —

‘A key to creative problem solving is tapping outsiders who use different approaches so that the “home field” for the problem does not end up constraining the solution.’

An outside advisor may offer solutions to a problem the founding team may not even consider because they are too close to the problem.


Knowing when to Give Up

Thirty percent of startups will go under within two years. Fifty percent will fail within five. Running out of money is the most common reason for failure. If a startup keeps trying to execute the same plan despite not gaining traction, it will fail.

Startup culture venerates hard work and not giving up. But here, Epstein provides an essential quote from Seth Godin:

‘We fail when we stick with tasks we don’t have the guts to quit.’

The best, most thought-through plan may fail when it comes up against external conditions — like a global pandemic. Persevering through difficulty can be a competitive advantage, but knowing when to quit can also be a significant strategic advantage. As a startup, it is vital to define and understand the conditions in which it is clear that Plan A has failed, and it is time to try something else.


Conclusion

Building and running a startup is exciting, scary, and can be extremely challenging. It rewards being able to adapt to complex, changing environments. It is vital to pick the right problem to solve, identify the correct tools to solve the problem, and build a team that learns how to make the most of diverse skill sets. Leveraging data and being metric driven can help guide, but must not constrain decision making. Leaning on external advisors and investors is essential to help keep the team grounded and provide different perspectives to solve tricky problems.

Finally, success is not just about persevering through difficult times; it also involves knowing when to quit and when to pivot. A battle may be won simply by disengaging at the right time.

Range is a fantastic book and one that I strongly recommend. The lessons in the book are important not just for individuals but also for teams.