liveBook · Manning

Chapter 2: Functional thinking in action

What you will learn in chapter 2 of Grokking Simplicity

This chapter introduction previews a broad tour of functional thinking through real-world examples, stratified design, and timelines.

After this chapter you will be able to

What it builds on

Section by section

Introduction

This chapter introduction previews a broad tour of functional thinking through real-world examples, stratified design, and timelines.

2.1 Welcome to Toni’s Pizza

Introduces Toni’s robot-run pizza restaurant as the setting for a forthcoming tour of functional thinking in its systems.

2.2 Part 1: Distinguishing actions, calculations, and data

Toni distinguishes code that uses kitchen resources from code that does not.

Key terms: actions, calculations, ingredients, resources

2.3 Part 2: Using first-class abstractions

The section identifies Toni’s multi-robot kitchen as a distributed system and briefly defines first-class functions before previewing how Toni will coordinate the robots.

Key terms: distributed system, robots, first-class functions, functions as arguments

2.4 Part 1: Distinguishing actions, calculations, and data

Toni’s growing pizza business illustrates why functional thinking begins by distinguishing actions, calculations, and data.

Key terms: functional thinking, actions, calculations, data

2.5 1. Actions

Defines actions in Toni’s pizza shop by their dependence on when or how often they happen and by their use of resources.

Key terms: actions, ingredients, resources

2.6 Calculations

This section presents calculations as decisions or planning that can run without affecting the world.

Key terms: calculations, decisions, planning

2.7 3. Data

The section shows how Toni uses immutable data in her pizza business and why data is flexible.

Key terms: immutable data, data

2.9 A first glimpse of stratified design

Introduces stratified design as layers of code arranged by how often they change, with more changeable code built on more stable code.

Key terms: stratified design, business rules, domain rules, tech stack, layers, stable foundation

2.11 As applied to a robotic kitchen

Toni’s one-robot kitchen introduces a timeline diagram for seeing when pizza-making actions execute and why their order matters.

Key terms: timeline diagram, actions

2.12 Timelines visualize distributed systems

Toni’s three-robot kitchen introduces timeline diagrams as a way to visualize parallel work and the problems caused by uncertain action ordering.

Key terms: distributed system, actions, timeline diagram, parallel

2.13 Multiple timelines can execute in different orderings

The section shows that uncoordinated robot timelines can run in different orders, causing pizza assembly to begin before the ingredients are ready.

Key terms: timeline diagram, coordination, uncoordinated timelines

2.15 Toni does a postmortem

Toni’s postmortem shows why uncoordinated timelines can produce unreliable results and how a timeline diagram can expose the risk.

Key terms: actions, timelines, coordinate, duration of actions, order, production, timeline diagram

2.16 Cutting the timeline: Making the robots wait for each other

Introduces cutting a timeline as a way to coordinate parallel work so completion order does not matter.

Key terms: cutting the timeline, timelines, parallel

2.18 Retrospective on coordinating robots

The section reflects on how cutting timelines coordinated Toni’s robots and how timeline diagrams helped her reason about their behavior.

Key terms: cutting a timeline, preparation, assembly, timeline diagrams, parallel and distributed systems, coordination

2.19 Conclusion

The conclusion recaps how functional thinking helped Toni organize her restaurant software and coordinate multiple kitchen robots.

Key terms: actions, calculations, stratified design, multiple robots, timing bugs

2.20 Summary

2.21 Up next…

The section transitions from a practical example of functional thinking to the upcoming examination of actions, calculations, and data.

Where this is used later

Concepts explained in this chapter

← Chapter 1: Welcome to Grokking Simplicity Chapter 3: Distinguishing actions, calculations, and data →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.