notebooks24 so far, more in the ink
The notebooks
I keep notebooks for the things I want to understand. Drawings first, words in the margins, and always the urge to take the thing apart to see how it moves.
Each one takes a single question that has caught my curiosity and answers it with machines you can poke: switches to flip, clocks to step, caches to thrash. They’re grouped by topic and in reading order inside each group. Read them top to bottom, or skip straight to the instruments.
01 · 6 notebooks
How chips compute
One CPU core, then thousands of GPU lanes, then a TPU’s grid of multipliers, how the three split the work, and how you program a GPU and compile for it.
What a CPU is, and how it works
On the clock that never stops Everything from NANDCounting with wiresFetch, decode, executeThe assembly lineFar from homeThe cacheBetting on the future open the notebook →What a GPU is, and how it works
On the patience of crowds A thousand slow brushesThirty-two in lockstepNever idleOne trip, not thirty-twoBring it in onceTensor coresGrid, block, warp, thread open the notebook →What a TPU is, and how it works
On a heart that beats in numbers A chip for one equationThe systolic arrayGood-enough numbersFeeding the beastCompiled, not scheduledA pod is one computer open the notebook →CPU vs GPU vs TPU
On three bets and one roof Three bets on siliconSame job, three runnersThe rooflineOne step, three chipsThe cost of movingWhich one, when open the notebook →Four ways to program a GPU
On how much to spell out Who counts the lanes?Who owns the widthPassing notes in the warpWrite for the tileWrite for the whole arrayPicking a level open the notebook →How GPU code reaches the chip
On machine code that won’t sit still Machine code that won’t sit stillOne kernel, three languagesRegisters decide the crowdWords all the way downApple’s roadCompiled while you playMany roads, a few hubs open the notebook →02 · 2 notebooks
How code becomes a program
What a compiler does between your source file and the machine, and the different ways languages clean up after themselves.
The architecture of an ahead-of-time compiler
On turning words into motion Before you press runWordsGrammarMeaningOne name, one valueThe optimiserSixteen registersBytes, symbols, a binary open the notebook →How languages manage memory
On giving things back You free it yourselfThe janitor walks the heapEveryone keeps a tallyOne owner, many borrowersCounting at compile timeCounting precisely, reusing in placeWhich one, for what open the notebook →03 · 3 notebooks
How LLMs and agents work
What happens inside a language model, and how an agent wraps it in tools, loops and memory.
How a large language model works
On guessing the next word Words into numbersOne job: the next wordA model you can trainMeaning as directionPaying attentionThe context window open the notebook →Anatomy of an AI agent
On a loop that uses tools A mind without handsThe loopTools are a contractA desk that fills upShapes of an agentKnowing when to stop open the notebook →How agents remember
On what to keep in mind A brilliant goldfishCutting the book into cardsMeaning as distanceFinding the right cardThe open-book examWhat’s worth remembering open the notebook →04 · 7 notebooks
What the cloud costs
FinOps from the start: the framework, the bill, who pays for what, how to spend less and how to see it coming. Roughly the ground of the FinOps Certified Practitioner exam.
What FinOps is
On making spend everyone’s business The month-long blind spotEveryone wants something differentInform, Optimize, OperateCrawl, walk, runThe map of capabilities open the notebook →How to read a cloud bill
On the rows behind the total Every line is a multiplicationOne line, four costsMillions of rowsThree clouds, three dialectsThe line nobody drew open the notebook →Cloud cost allocation
On names, tags and fair shares The unlabelled pileTags that stay putSplitting what everyone sharesInside the clusterA report or a charge open the notebook →Cloud cost optimisation
On rightsizing, idle and waste The waste huntOne size too bigLights off at nightUsage first, then rateThe greener bill open the notebook →How commitment discounts work
On promising just enough The list price is for strangersDrawing the waterlineWhere the savings peakOne year or three?When the money movesCheaper, if you can be interruptedThe flexibility ladder open the notebook →Forecasting, budgets and anomalies
On forecasts, budgets and surprises Three ways to guess next monthForecast the business, not the billBudgets that warn earlySpotting the spikeExplaining the miss open the notebook →Cloud unit economics
On cost per unit and what it’s worth The bill went up. Good?Choosing the unitWhat scale does to oneCost against revenueRunning a team on a unit cost open the notebook →05 · 6 notebooks
What AI costs
The same discipline for tokens, GPUs and seats: how AI is billed, split, forecast, cut and judged. Roughly the ground of FinOps Certified: AI Value.
How AI is billed
On the meters behind the bill Priced by the tokenWhat you typed, what you paid forThe agent rereads its deskPaying for the clockPer head, not per useFour bills that don’t agree open the notebook →AI cost allocation
On keys, tags and tokens with owners One key, five teamsThe gateway sees every callSharing a GPU clusterTraining once, serving foreverThe heavy tail open the notebook →AI cost forecasting
On ranges, tails and the agent that ran all night Estimate before the first callFat tails, not bell curvesCheaper tokens, bigger billsThe agent that ran all nightBudget the unit, not the total open the notebook →Cutting LLM costs
On context diets, cache hits and the right model for the job Where the tokens goPay once for the same prefixThe right model for each requestNot everything needs an answer nowStack the levers, watch quality open the notebook →API vs self-hosting
On meters, utilisation and the costs behind the GPU Two meters for the same tokensWhere the lines crossUtilisation is the priceWhat the GPU bill leaves outSeats, usage or both open the notebook →AI unit economics
On outcomes, quality bars and the value of a saved hour Cost per call is the wrong unitWhere you put the barCost against valueTime to valueA portfolio, not a project open the notebook →// more notebooks are on the bench