How to Read This Book

A Map, Not Just a Path

This book can be read from beginning to end. But it doesn't have to be.

The chapters form a web of interconnected ideas. Some concepts build on others. Some stand in tension. Some offer alternative perspectives on the same problem.

We have drawn you a map---a visual guide to how these concepts relate. You will find it in the next chapter. Use it to:

Whether you follow the linear path or chart your own course, the map will be your companion.

  • See the whole territory before you begin
  • Find your own path based on your interests
  • Understand why certain ideas appear where they do
  • Return to earlier concepts when later ones need them

The Split View

Throughout this book, you will encounter ideas presented in two forms side by side:

Natural LanguageNotation
The board has 64 squaresboard: 64 squares
Each square is empty or has one piecesquare: empty OR piece
The white knight starts at g1board[g1] = white_knight

The left column is natural language---how we might describe something to a friend. The right column is notation---a more precise way of saying the same thing.

Neither is "better." They are complementary. As you read, let your eye move between them. See how the same idea takes different shapes.

The Margins

The margins of this book are not empty space. They contain:

You can read straight through and ignore the margins. Or you can let them guide you into deeper waters. The choice is yours.

Reading companions
novels and accessible works that explore the same ideas through story
Technical asides
deeper details for those who want them
Connections
links to other chapters and concepts
Map references
pointers back to the concept map, showing where you are in the larger territory

One Concept at a Time

When new notation appears, we pause. We do not rush past unfamiliar symbols.

If you see something like opposite(white), we will stop and ask: what is opposite? We will explain it fully before moving on.

Each new concept earns its moment of attention. By the end, you will have built a complete vocabulary---but you will have built it yourself, one word at a time.

The Chess Board

We return to the chess board again and again. Not because chess is the goal, but because it is a lens.

Through chess, we will see:

  • State (the position of pieces)
  • Events (moves)
  • Rules (what is allowed)
  • History (the record of play)
  • Branching (what if?)
  • Abstraction (what do all board games share?)

If you know chess, good. If you don't, here's all you need to know:

The Coordinate System

The board has 8 columns (called files) labeled a through h, and 8 rows (called ranks) numbered 1 through 8. Every square has a unique name: the file letter followed by the rank number.

When we write "knight moves from g1 to f3," we mean: the knight on square g1 moves to square f3.

e4
is the square at column e, row 4 (center of the board)
g1
is the square at column g, row 1 (where white's knight starts)
a8
is the corner square at column a, row 8 (where black's rook starts)

The Starting Position

Here is the board at the start of a game:

White's pieces are at the bottom (ranks 1-2), black's at the top (ranks 7-8). The pieces are:

\symkingKingThe most important piece
\symqueenQueenThe most powerful piece
\symrookRookMoves in straight lines
\symbishopBishopMoves diagonally
\symknightKnightMoves in an "L" shape
\sympawnPawnThe foot soldiers

You don't need to know the rules of chess to follow this book. We only care about positions and changes---not strategy.

Move Notation

When we write a move, we use a simple, explicit format:

piece from → to

For example:

knight g1 → f3
the knight on g1 moves to f3
pawn e2 → e4
the pawn on e2 moves to e4
queen d1 → h5
the queen on d1 moves to h5

No cryptic abbreviations. Just: which piece, from where, to where.

Take Your Time

This is not a book to rush through. Each chapter builds on the last. If something feels unclear, return to the previous chapter. The ideas are connected like links in a chain.

Better to understand one chapter deeply than to skim five.

Many Paths Through the Map

Before you begin, it helps to see the shape of the territory. Here is a simplified view:

Every system has state, responds to events, and follows rules. State can change through mutation (transforming in place) or derivation (creating anew). These philosophies give rise to three paradigms---three different lenses for seeing the same problems.

The concept map chapter expands this into a full landscape. But this simple triangle is enough to begin: everything connects back to systems, state, and change.

Five Reading Paths

The concept map offers five distinct paths through this territory. Choose based on your background and interests:

The Linear Path
Follow the chapters in order. Best for those new to programming who want a guided journey through all the ideas.
The Functional-First Path
Begin with pure functions and immutability, then see how state and mutation emerge as practical necessities. For those drawn to mathematical thinking.
The Object-Oriented Path
Start with objects and messages, the way many programmers first learn. Then discover the functional ideas hiding beneath.
The Builder's Path
Focus on practical constructs: loops, conditionals, functions. Skip the philosophy, get to building. Circle back to theory when you're ready.
The Philosophy Path
Dwell on the deep questions. Why mutation? Why abstraction? What does it mean for code to be "correct"? For those who want to understand before they do.

No path is better than another. They all traverse the same territory. They simply offer different views along the way.

PathStarts WithBest For
LinearPart IComplete beginners
FunctionalDerivationMath-minded thinkers
ObjectObjectsExperienced programmers
Builder'sBuilding BlocksHands-on learners
PhilosophyDeep questionsCurious minds

Now, let us look at the board.