AI pair programming
- Standard term
AI pair programming is writing code in conversation with an AI assistant, working through a change in short turns where you and it trade code, questions, explanations, tests, and feedback.
Narrow turns make the latest proposal easier to isolate and test. You can report a concrete failure and ask for a focused revision before more code depends on it. A failure may still involve earlier code, so the surrounding behavior matters too.
Where you’ll meet it
You're adding a sign-up form to your website with an AI assistant in your code editor. It writes the code that checks the email field, and the form accepts your own address on the first try.
What to do
- Ask which valid email addresses the check would reject and which invalid entries it would accept.
- Test a valid address with a plus sign and a blank field; agree the expected result for each.
- Run the tests, compare actual and expected results, and paste any failure back into the chat.
Easy to mix up
In pair programming you trade short turns with the assistant and steer each next request. An AI agent takes a whole goal and works through several steps on its own before checking back.
Check yourself
Your assistant drafted a price formatter displaying “$1,299.00” and a rule deciding refunds within 30 days of purchase. Tests cover the formatter's expected cases, but the refund cutoff is unchecked. You have time to read one closely. Which one?
Go deeperThe pair-programming analogy has limits
Human pair programming predates Extreme Programming, the method Kent Beck set out in the late 1990s. In a common arrangement, a driver types while a navigator reviews the work and keeps the larger plan in view. GitHub launched Copilot in 2021 as “your AI pair programmer,” borrowing that collaborative framing.
The analogy does not give the assistant a human partner's responsibility or reliable judgment about its own uncertainty. A confident explanation is therefore something to examine, not evidence that the code works. Decide what to trust from checks suited to the change.
Sources
- Introducing GitHub Copilot: your AI pair programmer, GitHub Blog
- Extreme Programming Explained: Embrace Change, www.informit.com
- Pair Programming, agilealliance.org