// book + course companion
Resources
Everything in the book and the course that goes out of date lives here instead of on the printed page: model names, tool versions, library choices, service providers, and pricing. The book's "In practice" boxes all point at this page. Each one is listed below with a direct link to its answer.
// on this page
00 // find it by chapter
Find It By Chapter
Every dated box in the book points here. Find the chapter you are reading and follow the link straight to its answer.
01 // editor and extensions
Editor and Extensions
The book uses one editor throughout, with the coding assistant, the file tree and the terminal all in the same window. Any editor with those three plus an extension system will do. These are the current options and what separates them.
VS Code
book defaultThe editor used throughout the book. Free, and available for Windows, macOS and Linux. Both coding assistants covered in the book install into it cleanly.
Visit site ↗Cursor
VS Code forkA fork of VS Code with AI features built into the editor rather than added by an extension. Everything in the book still applies; the assistant is in a different place.
Visit site ↗Windsurf
VS Code forkThe other AI-native VS Code fork. Similar capability to Cursor with a different interaction model.
Visit site ↗Rainbow CSV
extensionThe extension the book uses to demonstrate the install-and-remove cycle. It colour-codes columns in CSV files, which is genuinely useful for maker data logs.
Visit site ↗Three settings to change before you start
- Auto save — an AI agent reads the file on disk, not the version in your editor's memory. Without auto save you can edit, prompt the agent, and have it act on a stale copy. Set it to trigger a short delay after you stop typing.
- Word wrap — agents generate long comment lines and long strings. Without wrap you scroll sideways to read them.
- Terminal font size — the default is small on most screens, and agents run for long stretches.
Shortcuts worth knowing
Ctrl + ` Cmd + ` Ctrl+Shift+P Cmd+Shift+P Shortcuts vary across operating systems and editor updates. If one does not work, search for "keyboard shortcuts" in the Command Palette.
Open the folder, not the file. AI coding tools operate on folder context. Start the editor with "Open Folder" on the project root and the assistant sees every file in it. Open a single file and that is all it sees, so it cannot resolve imports, find functions defined elsewhere, or read your configuration.
02 // coding agents
Coding Agents
A coding agent reads your project files, writes changes to them, and runs commands, stopping for your approval before each write. The book uses two, one in a sidebar panel and one in the terminal. They do the same work in different places.
Cline
panel-integratedA VS Code extension. Its panel has a toolbar at the top with the model selector and an optional token and cost display, a conversation thread in the middle listing every action it took and what came back, and a task input at the bottom.
Do this before your first task
- Install the extension and confirm its icon appears in the icon strip.
- Required: open Cline’s settings, find the terminal execution option, and set it to background execution mode. The default can hang terminal commands in a way that needs a full VS Code restart to clear.
- Leave every auto-approve checkbox unchecked. Turn a category on only after you have decided the checkpoint adds no value for that action on that project.
Tip: Type @ followed by a filename in the task input to point the agent at one file without handing it the whole project.
Claude Code
terminal-nativeA command-line program called claude, run in the integrated terminal. No sidebar panel; the same read, write and run loop happens as text in the scrollback, with the same confirmation before any change.
Do this before your first task
- Confirm the install: run claude --version in the integrated terminal.
- Start a session: run claude on its own, type your task in plain language, and confirm any proposed write or command before it runs.
- Add a CLAUDE.md file to the project root. Claude Code reads it automatically at every session start.
npm install -g @anthropic-ai/claude-code Tip: One-shot mode runs a single task and exits: claude "task description". Useful in scripts and build steps. Ignore any flag that mentions skipping permissions; it exists for automated pipelines, not interactive development.
Alternatives
GitHub Copilot
alternativeSubscription assistant from GitHub, strongest at inline autocomplete. Copilot Workspace covers the agentic end.
Visit site ↗Cursor Agent mode
alternativeThe agentic mode inside the Cursor editor. Same loop, built into the editor rather than added by an extension.
Visit site ↗Session commands worth knowing
Claude Code only.
/exit or Ctrl+C Ends the session /clear Wipes conversation history and starts fresh. Use it when a task is done and the next one begins /help Lists all available commands and flags --model Overrides the default model for one session. Run claude --help for current identifiers Persistent instructions
Most agents read a short instructions file from the project root before your first task. Write it once and every session on that project inherits it. It is the right place for the things that should hold across every task: the board you are targeting, the pin assignments that must not change, the libraries you are using. A short file works better than a long one. List the things the agent would otherwise get wrong and leave the rest to the task description.
CLAUDE.md .clinerules Target board: ESP32-S3 running MicroPython.
Pin assignments: SDA=21, SCL=22, status LED=2. Do not change these.
Libraries: uasyncio and machine. Do not substitute alternatives.
All sensor readings in metric units (Celsius, millibars, percent).03 // ai models and providers
AI Models and Providers
The book names models by capability tier rather than by version, because versions turn over every few months. What does not change is the strategy: put your strongest model on the planning conversation, which runs once and shapes every file that follows, and a cheaper one on the implementation, which is mechanical.
How the book's builds split the work
Planning — a frontier model. The specification produced by the planning conversation shapes every file the agent writes afterwards. It is the highest-leverage point in the build and the one place worth your strongest model. The conversation is short and runs once, so even a top-tier model costs almost nothing here. In the book's Part III build this was Opus 4.7, used in an ordinary chat interface rather than a coding agent.
Implementation — a mid-priced model. Once the plan is written, carrying it out is mechanical and a cheaper model does it well. In the book's Part III build this was Qwen 3.6 Plus, a moderately priced open-weight model, driven by Cline.
The larger point still holds: the quality of your prompts and your reasoning matters more than the model tier. Matching a strong model to the planning and a cheaper one to the build is just the practical way to apply it.
claude-haiku-4.5 Fastest and cheapest. Good for high-volume, low-complexity tasks. ↗ claude-sonnet-5 Strong reasoning at a reasonable cost per token. The default for most coding work. ↗ claude-opus-5 Highest capability. Use for complex planning and agentic tasks. Ch 22 planning conversation used Opus 4.7 ↗ gemini-3.5-flash, gemini-3-pro Strong long-context capability. Flash variant is fast and affordable. ↗ qwen3.8-max, qwen3-coder-plus Strong coding-focused open-weight family from Alibaba. Ch 22 implementation used Qwen 3.6 Plus ↗ deepseek-v4-pro, deepseek-v4-flash High-performing open-weight with strong price-to-performance ratio. ↗ mimo-v2.5, mimo-v2.5-pro Compact reasoning-focused models from Xiaomi for constrained environments. ↗ 04 // running models locally
Running Models Locally
Running an open-weight model on your own machine costs nothing per call and keeps your code and your documents off someone else's server. What it costs instead is GPU memory. The thresholds below shift as quantization improves, so treat them as starting points rather than limits.
Ollama
CLIRun open-weight models locally with a simple CLI. Recommended for local inference.
curl -fsSL https://ollama.com/install.sh | sh LM Studio
GUIGUI-based alternative to Ollama. Good for browsing and downloading models.
Visit site ↗VRAM requirements (approximate)
| VRAM | Usable model size | Examples |
|---|---|---|
| 8 GB minimum | Up to 8B dense or small MoE | Qwen3-8B (Q4), Llama 3.2 3B |
| 16 GB comfortable | Up to 14B dense | Qwen3-14b (Q4), Qwen3.6-35b-a3b (Q4, MoE) |
| 24 GB+ | 27B+ dense | Qwen3.6-27b (Q4), Qwen3-32b (Q4) |
05 // api access and cost
API Access and Cost
When a model runs inside your finished tool rather than in your workflow, you call it over an API. Three things change between providers and between API versions: the SDK you install, the parameter names, and the price. The concepts underneath are stable.
The SDK and the two parameters
temperature max_tokens Temperature near zero makes the model reach for the most probable next word every time, which gives consistent, predictable answers. Higher values introduce variety, which is what you want from a brainstorming partner and exactly what you do not want from a tool reporting a voltage limit. For factual question-answering, keep it low. Maximum output length caps how much the model produces in one reply. Without a cap it sometimes runs on well past the point of usefulness, which costs money and slows the response.
pip install anthropic Keeping your key safe
Never put an API key in your source code. Keys that reach a git history are hard to scrub out fully, and public repositories are scanned continuously by automated tools hunting for exactly this. A key committed once should be treated as compromised and rotated.
- Put the key in a
.envfile at the project root, asANTHROPIC_API_KEY=... - Add
.envto.gitignorebefore the first commit - Read it at run time with
python-dotenv(pip install python-dotenv)
Pricing
This page gives no prices, for the same reason the book gives none. Token prices change often and differ between providers and model tiers, and a price you have memorised or seen quoted in a tutorial older than a few months is probably wrong. Check the provider's current pricing page before you estimate the cost of anything.
The four ways an API call fails
Service error — the API returns an error status. Common ones are an authentication failure from a wrong or expired key, a rate limit from too many calls too quickly, and a server error on the provider's side. Authentication failures need you to fix the key and will not clear on their own; rate limits and server errors are usually transient.
Timeout — the reply does not arrive within your deadline, which happens under heavy load or with an unusually large context. Catch it as its own case rather than as a hard failure.
Unexpected output format — you asked for JSON and got prose, or expected three fields and got two. This is the quiet one. Validate the shape of every response before you use it.
Content refusal — the model declines to answer. Safety filters occasionally trip on entirely benign technical content. Notice a missing or unusually short reply and handle it, rather than passing an empty string through as if it were an answer.
Retry the transient ones once after a short wait. Do not retry an authentication failure or a malformed response, because the same call fails the same way and you have only doubled the cost. Log every call with a timestamp, token counts, latency and any error code. The goal is a tool that fails quietly for the user and loudly in the logs.
06 // the four builds
The Four Builds
Each part of the book ends with a working tool. These are the stacks each one uses. Anything named in the book's running text is stable infrastructure; anything named only in a dated box is here because it moves.
stable named directly in the book's running text. volatile named only in a dated box, and expected to change.
RC filter analyser
A single HTML file with no install step, built in a browser chat interface. Nothing to set up.
Serial data plotter
An Arduino sends temperature, humidity and lux over USB serial once a second. A Python server reads the port and streams to a browser, where Chart.js plots each channel on its own live chart. A two-line config switch runs the whole thing without hardware attached.
- Serial line format is four CSV fields: timestamp_ms,temperature_c,humidity_pct,lux
- USE_MOCK in config.py switches between the simulator and the real board
- The /stream route returns content type text/event-stream
Datasheet Q&A tool
Upload a PDF datasheet, ask questions, get answers with the section they came from. The first build where a language model runs inside the finished tool at run time.
Resource booking system
The multi-user capstone: accounts, a database, conflict detection, external services, background jobs and multi-tenancy, deployed to a real server.
07 // document preparation
Document Preparation
Text pulled straight out of a PDF loses its structure. Rows and columns collapse into a stream of tokens, columns misalign, a unit lands on the wrong row, a table breaks across a page. On a datasheet that produces a confidently wrong answer about a safe operating limit. The fix is stable even though the libraries are not: convert to markdown first, then chunk.
pymupdf4llm
PDF to markdown, preserving headings and table structure
pip install pymupdf4llm langchain-text-splitters
Splits the markdown. RecursiveCharacterTextSplitter, 900 characters, 150 overlap
pip install langchain-text-splitters Split on headers first and on character count second. The chunk size and overlap above are the book's starting values, not a rule. They are among the first things to adjust when retrieval quality disappoints.
08 // rag stack and alternatives
Retrieval Stack
Retrieval-augmented generation answers one question: how do you get the right part of a long document in front of the model, so its answer is grounded in your document and you can check it against the source. These are the pieces the book's build uses, and the alternatives Appendix A surveys.
Embedding runs on your own machine here, so there is no per-call cost and no datasheet content leaves it.
The two ways retrieval fails
Grounding failure — the model answers from its own training rather than from the retrieved passage. The remedy is instruction and citation: require the answer to name the section it came from.
Retrieval failure — the right chunk ranks below a less relevant one and never reaches the model, because the question's terminology sits far from the document's. Semantic search closes much of the vocabulary gap but not all of it. The remedy is hybrid search plus re-ranking.
Alternatives Worth Knowing
Appendix A surveys these. Every one of them answers the same question RAG answers, and none of them removes the last step, which is checking the number against the datasheet yourself.
Cache-augmented generation (CAG) — Load the whole document into the model once, cache it, and answer every later question against the cached copy with no retrieval step at all. Simpler and often better than RAG for a single stable document you control. It breaks when the document does not fit the context window, and cost scales with what you cache. Reach for it when you know the document is small.
Agentic retrieval — Hand the search to the model. Give it keyword search, jump-to-section and read-page tools and let it work the way a person does: search, read, refine, repeat. Strong on structured documents like datasheets, which have a contents page and numbered sections. Costs more, because each step is another round trip. The natural second version once the basic tool earns its keep.
Hybrid search with re-ranking — Run semantic search alongside plain keyword search, combine the lists, and re-order them with a second model. Directly softens the terminology-mismatch failure, which matters in datasheets full of part numbers and register names. The first upgrade to reach for.
Page-image retrieval — Embed the page image itself rather than the extracted text, so a passage is retrieved by what the page looks like, tables and figures included, and never passes through a fragile extraction step. Follow this branch if the extraction problems in Chapter 20 are what frustrate you most.
Graph-based retrieval — Map how entities in the document relate to each other and retrieve over that map. Useful for questions about relationships spread across a document. Costs more to build and maintain.
Fine-tuning — Mostly listed so you know when not to use it. There is nothing to train on ahead of time when the document is whatever the user just uploaded, and a fine-tuned model gives you an answer with no passage to point back to, which destroys the property that makes the tool trustworthy.
As of August 2026: prompt caching and million-token context windows have made cache-augmented generation practical for documents far larger than a single datasheet, and agentic retrieval is now the default interaction model in coding assistants. Page-image and graph-based retrieval remain largely research-grade.
Choosing
One document that fits the context window, and stable: CAG. One large but well-structured document, and you can invest in tools: agentic retrieval. Any document of any size, which is what the Part III tool has to handle: RAG, because it is the only approach that assumes nothing about the input you cannot guarantee. A large, shifting corpus: stay with RAG and start swapping in the sharper parts, hybrid search first.
09 // external services
External Services
The booking system depends on three things it does not control: a holiday calendar, an email provider, and a scheduler. What matters is not which ones you pick but the pattern around them, so the tool keeps working when one of them does not.
Nager.Date
Public holiday data
Free, no API key, covers over a hundred countries. The country is set with the NAGER_DATE_COUNTRY configuration value.
Visit site ↗APScheduler
Background jobs on a timer
Register the function and the interval once. No message broker, no external queue, no extra infrastructure.
Visit site ↗The cache-first fallback
- Check the local cache first. If the answer for that country and year is already stored, use it and make no network call.
- On a miss, call the service, then write the result to the database so the next request is a hit.
- If the service is unreachable and the cache is empty, degrade to a defined behaviour rather than failing the request.
Two cautions for background jobs
Idempotency — a job that runs twice must not send the email twice. Make the effect safe to repeat.
Application context — a job running outside a request has no application context by default. Establish one before it touches the database.
10 // deployment and operations
Deployment and Operations
There are two kinds of deployment in this book. A maker-level launcher gets a personal tool started with a double click. A production deployment puts a multi-user application on a server other people can reach. Both are here.
Maker-level: the launcher script
A tool that takes four terminal commands to start is a tool you skip on the days you are in a hurry. A launcher closes that gap: move into the project folder, activate the environment, start the app in the background, wait for the server, open the browser. Do not write it by hand. Describe your setup to the agent, because a launcher is specific to one machine: the shell, the browser command, and the location of the virtual environment all differ.
Write a launcher script for my serial plotter Flask app. I am on Linux Mint. The
script lives in the project root next to app.py. When run, it should move into its
own folder, activate the venv virtual environment, start app.py in the background,
wait a couple of seconds for the server to come up, then open http://localhost:5000
in my default browser. Make it double-clickable.Swap "Linux Mint" for your own operating system and confirm your virtual environment folder is really named venv.
#!/bin/bash
cd "$(dirname "$0")"
source venv/bin/activate
python app.py &
sleep 2
open http://localhost:5000@echo off
cd /d "%~dp0"
call venv\Scripts\activate.bat
start "" python app.py
timeout /t 2 /nobreak >nul
start "" http://localhost:5000On Linux, open becomes xdg-open. Run chmod +x start.sh once to make it double-clickable; .bat files need no equivalent step. If the browser opens before the server is ready, raise the wait to 4 or 5 seconds.
Production: the stack
What a good deployment gives you
A health check — a /healthz endpoint the pipeline can poll. If a freshly deployed version fails it within thirty seconds, the previous version is redeployed automatically.
One-click rollback — every deploy produces a tagged image, a labelled snapshot of that exact version. A separate rollback action redeploys a chosen earlier one. Open the project's Actions tab on GitHub, choose the rollback workflow, and give it the short commit ID of an earlier build. A bad release is one action, not a live debugging session under pressure.
Secrets from the environment, never from the repository — no API key or database password in a file git tracks.
Deploy is a git push — and so is the rollback.
11 // runtime and dev tools
Runtime and Dev Tools
The baseline every project in the book assumes. Check these before you start rather than halfway through a build.
Python
3.13+Current stable is 3.14. Python 3.9 and older are end-of-life, so upgrade if you are still on them.
3.9 and older are EOLNode.js
24.x LTSRequired for Claude Code. Always install the LTS release.
Git
2.x stableAny recent 2.x release works for the book projects.
npm
bundled with NodeComes with Node.js. Used to install Claude Code.
pip
bundled with PythonUse pip3 on systems that have both Python 2 and 3 installed.
12 // business and payments
Business and Payments
course onlyCourse material. Chapter 14 of the book covers using AI for the business layer, customer communication, policy documents and marketing copy, but names no payment provider. These are the providers the course recommends when you start charging for something.
Paddle Billing
recommendedRecommended. Handles VAT and GST compliance on your behalf internationally.
Visit site ↗13 // downloads
Downloads
A handful of files from the book that are easier to download than to retype. The full source for each build is walked through in the book and shown in full in the video course.
Arduino simulator sketch
The sketch from the Part II build. Streams one CSV line per second in the format the plotter expects: timestamp_ms,temperature_c,humidity_pct,lux.
Download ↓Persistent instructions starter — Claude Code
A minimal project instructions file for a firmware project. Copy it to your project root and change the board and pin assignments.
Download ↓Persistent instructions starter — Cline
The same content under the filename Cline reads. Save it to your project root as .clinerules.
Download ↓Specification template
The four-element structure the book uses for every build: task, context, constraints, output format. Fill it in before the agent writes a line.
Download ↓
Save CLAUDE.md.txt as CLAUDE.md and clinerules.txt
as .clinerules. They are served with a .txt extension so your
browser shows them rather than treating them as an unknown file type.
14 // further reading
Further Reading
The sources behind Appendix B, on staying in charge of your own work as the tools get better. Grouped as the appendix groups them.
General
AI shaming: the term itself
AI shaming: the core empirical result
AI shaming: supporting evidence
AI shaming: counter-evidence
On why writers hide it
15 // the companion video course
The Companion Video Course
txplo.re/ai_course points here.
The course follows the same builds as the book. Where the book explains each build and walks you through the key steps, the videos capture every detail of the work: each prompt, each response, the dead ends, the corrections, and the small decisions that rarely fit onto a printed page. If you want finer granularity on the practical chapters, or you simply learn better by watching before you build, that is what the course is for.