Computation and Interaction
Software does two things: it computes and it communicates. This section covers the patterns that describe how programs transform data and how separate pieces of software talk to each other.
An Algorithm is a step-by-step procedure for turning inputs into outputs. Algorithmic Complexity tells you how much that procedure costs as the work gets bigger. But no useful program lives in isolation; it has to interact with the outside world. An API defines the surface where one component meets another, and a Protocol governs how those components behave across a sequence of exchanges over time.
Some of the hardest questions in computing come from how programs behave under varying conditions. Determinism is the property that the same inputs always produce the same outputs, easy to lose and hard to get back. A Side Effect is any change a function makes beyond its return value, and managing side effects sits at the center of writing reliable software. Concurrency brings the challenge of multiple things happening at once. An Event is a recorded fact that something happened, the basic unit of communication between systems that share neither memory nor time.
When you ask an AI agent to call an API, handle concurrent tasks, or process events from a webhook, you need a shared vocabulary for what’s going on under the hood, even if you never write the code yourself.
This section contains the following patterns:
- Algorithm — A finite procedure for transforming inputs into outputs.
- Algorithmic Complexity — How time or space cost grows as input grows.
- API — A concrete interface through which one software component interacts with another.
- Protocol — A set of rules governing interactions over time between systems.
- Determinism — The same inputs and state produce the same outputs.
- Side Effect — A change outside a function’s returned value.
- Concurrency — Managing multiple activities that overlap in time.
- Event — A recorded fact that something happened.