Chapter 01
What AI coding tools are good and bad at
How the models behind these tools work, the three ways you use them, and where they help or hurt, so you know when to reach for one and when to think first.
Large language model
Also called LLM, model, foundation model
- What
- The model behind every AI coding tool: a program trained on huge amounts of text and public code that predicts the most likely next piece of text, called a token, given everything before it.
- Why
- It explains both the magic and the mistakes. The model produces code that looks like code it has seen, which is usually right for common tasks and plausibly wrong for unusual ones.
Watch out
Thinking the model looked something up or ran the code: unless the tool actually ran a command or read a file, it predicted the answer.
Hallucination
Also called confabulation, made-up API, invented function
- What
- A confident answer that is simply wrong: a function, option, file path or package that does not exist, or a version detail from before the model was trained.
- Why
- Hallucinated code often compiles in your head and fails at runtime. Checking names against the official docs, the type checker and the tests is how you catch it.
- Example
- A tool suggests
df.drop_nulls()for a pandas DataFrame. It sounds right, but pandas calls itdropna();drop_nullsbelongs to Polars.
Watch out
Trusting details about a library version newer than the model, instead of opening that version's docs.
Context window
Also called context, tokens, context limit
- What
- Everything the model can see at once: your messages, its replies, the files it read, command output and the tool's own instructions. It has a fixed size measured in tokens.
- Why
- The model only knows what is in the window. When it fills up, tools summarise or drop older parts, and quality falls, so managing context is a core skill.
Watch out
Keeping one long conversation for unrelated tasks, so old, irrelevant detail crowds out what matters now.
Completion, chat and agent
Also called autocomplete, ghost text, agent mode, inline suggestions
- What
- The three ways you use these tools: completions suggest the next lines as you type, chat answers questions about code, and an agent reads files, edits several of them and runs commands to finish a task.
- Why
- Each needs a different level of checking. A two-line completion is easy to read; an agent that changed twelve files and ran a migration needs a proper review.
Watch out
Reviewing agent changes with the same quick glance you give a one-line completion.
Where AI helps most
- What
- Well-trodden work with a clear check: boilerplate, syntax you half remember, explaining unfamiliar code, first drafts of tests, mechanical refactors covered by tests, and searching a codebase you are new to.
- Why
- Handing over this work saves time without hiding anything important, because you can verify the result quickly and you already know what good looks like.
- Example
- Asking for a script that renames 300 files by date is a good fit: the task is common and you can check the result on a copy of the folder.
Where AI struggles
- What
- Work that depends on facts the model cannot see or rarely saw: your business rules, subtle concurrency, security decisions, new library versions, performance under real load, and large, vague tasks with no clear definition of done.
- Why
- These are the places where a plausible answer is most dangerous, so they need your design thinking first and much closer review afterwards.
Watch out
Asking an agent to "build the whole app" and then trying to understand thousands of lines after the fact.
Automation bias
Also called over-trust, rubber-stamping
- What
- The human habit of trusting output from a confident machine more than we should, and approving it with less care than we would give a colleague's code.
- Why
- Most AI coding incidents are review failures, not tool failures. Naming the bias makes it easier to slow down for the changes that deserve it.
Watch out
Clicking approve on the tenth permission prompt without reading it because the first nine were fine.
Claude Code
- What
- Anthropic's coding agent. It runs in your terminal and also in VS Code, JetBrains IDEs, the Claude desktop app and the browser, reading your project, editing files and running commands you allow. Most surfaces need a paid Claude plan or an API key.
- Why
- It is agent-first: you describe the outcome and review the work, rather than accept suggestions line by line. That makes the habits in this sheet, planning and verifying, matter even more.
Watch out
Treating it like a chat window and pasting code in and out, instead of letting it read the files and run your tests.
Go deeper
- Deep Dive into Large Language Models like ChatGPTFree · videosefism.com/resources/deep-dive-into-large-language-models-like-chatgpt
- Prompt Engineering GuideFree · guidesefism.com/resources/prompt-engineering-guide
- Stack Overflow Developer SurveyFree · guidesefism.com/resources/stack-overflow-developer-survey