AI pair programming
Also known as: pair programming with AI
Writing code together with an AI tool in a running back-and-forth, where the human stays in charge and checks every change.
Draft - this entry has not been reviewed yet.
Formal
A way of working, named after the practice of two programmers sharing one screen, in which a developer and an AI coding assistant take turns proposing, questioning and refining code, with the developer reading and approving each change before it is kept.
In plain English
Like driving with a quick-thinking friend reading the map - they suggest turns and spot signs, but your hands stay on the wheel and you decide where to go.
In practice
A developer at an accounting firm, chasing a rounding error in invoice totals, asks the assistant for two possible fixes, picks one, then has it explain a line she does not trust before keeping the change.
Why it matters
Keeping a person reading along is what separates helpful speed from blind trust - the human catches the confident mistakes before they reach real users.
Technical deep dive
Pair programming was formalised in Extreme Programming by Kent Beck in the late 1990s: two developers at one workstation, a driver who types and a navigator who reviews each line, thinks ahead and catches mistakes, swapping roles frequently. GitHub marketed Copilot from its 2021 launch as "your AI pair programmer", and tools such as Aider describe themselves the same way. The metaphor is imperfect in an instructive way: in AI pairing the model usually drives, producing code faster than a person types, and the human becomes the permanent navigator, whose job is exactly the review discipline that is easiest to let slip.
Effective practice keeps changes small and reversible. The developer states intent and constraints, asks for one focused change, reads the diff, runs tests, and commits before the next step, so each increment can be rolled back; Aider, for example, commits every AI edit to git automatically for this reason. Useful moves include asking for two alternative approaches before choosing, asking the model to explain a line or predict how code behaves on an edge case, having it write failing tests first and then the implementation, and challenging its assumptions rather than accepting the first answer. The model has no persistent memory of team conventions unless they are supplied through instruction files or the prompt.
The productivity evidence is mixed and context-dependent. In a controlled experiment by Peng et al. (2023), developers with Copilot completed a greenfield task, implementing an HTTP server in JavaScript, 55.8% faster than a control group. METR's randomised trial published in July 2025 found the opposite for experts on familiar ground: 16 experienced open-source maintainers working on 246 real issues in their own large repositories took 19% longer when AI tools were allowed, while believing afterwards that AI had made them about 20% faster. The gap between perceived and measured speed is itself a reason to measure rather than assume.
The security evidence points the same way. Perry et al. (ACM CCS 2023) found that participants with an AI assistant wrote less secure code on several tasks and were more likely to believe their code was secure, a textbook case of automation bias. Human pairing also delivers knowledge sharing, collective code ownership and mentoring, which AI pairing does not replace and may erode if juniors accept code they could not have written. The line from vibe coding is whether the human reads and understands every change; the line from a coding agent is whether the human is present at every step.
What to learn first
Everything this builds on, foundations first.
- Token
- →Context window
- →Transformer
- →Large language model (LLM)
- →AI coding assistant
- →AI pair programming
Relationships
- Requires
- AI coding assistant
- Don't confuse with
- Vibe coding
Sources & further reading
Reference works
- Chen et al. (2021), Evaluating Large Language Models Trained on Code
- Perry et al. (2023), Do Users Write More Insecure Code with AI Assistants? (ACM CCS)
- METR (2025), Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity · METR
- Peng et al. (2023), The Impact of AI on Developer Productivity: Evidence from GitHub Copilot · arXiv
Where this data comes from
This entry was drafted by an AI from the sources above and has not yet been checked by a person. Treat it as a starting point, and check anything important against the sources.
See the review queueSuggest a correction on GitHubThis term as JSON
Check yourself
Loading…