My AI Assistant Wrote My Code. I Wrote the Bug Report.

Last month an AI assistant wrote me a beautiful function. Clean names, a helpful docstring, type hints, even an edge case I hadn't considered. It also used a library method that doesn't exist. It didn't hesitate. It didn't add a comment saying "probably." It simply invented pandas.DataFrame.smart_merge() with the calm confidence of a man giving directions in a city he has never visited.
That's the whole story of AI coding tools in one anecdote: impressive, fast and occasionally fictional.
What they're genuinely great at
- Boilerplate. Argument parsing, data classes, test scaffolding, SQL for a simple report. The boring 60%.
- Unfamiliar APIs. "How do I do X in this library?" gets you a starting point in seconds instead of twenty minutes of documentation.
- Explaining code. Paste a gnarly regex or an old function and ask what it does. Surprisingly good.
- Tests. Ask for edge cases you didn't think of. Even when some are silly, one or two are gold.
- Rubber ducking. Describing a problem to something that answers back often makes you see the solution yourself.
Where they bite
- Invented APIs and parameters, especially for less popular libraries or recent versions.
- Subtle logic errors in code that looks perfect: off-by-one, wrong time zone, swapped arguments.
- Security. They'll happily build SQL with string concatenation or disable certificate checks "to make it work."
- Missing context. The tool doesn't know your team's conventions, your data volumes or the outage you had last year.
The shift nobody warned me about


I type far less now. I review far more. That's the real change: the job moves from writing code to judging code. And judging is harder than it sounds, because AI-generated code is fluent. It looks like code written by someone competent, so your brain relaxes. That's exactly when bugs walk in.
My rules for working with an AI pair programmer
- Never merge what you can't explain. If you couldn't defend a line in code review, you don't own it yet.
- Run it. Every suggestion gets executed and tested, not just read.
- Check imports and method names against real documentation when you don't recognise them.
- Ask for tests alongside code, and read the tests first. Wrong tests are a great way to discover a wrong understanding.
- Keep secrets out of prompts. Your API keys and customer data don't belong in a chat box.
So, is it worth it?
Absolutely. I'm faster, I try more ideas and I spend less time on tedium. But "AI wrote it" is not an excuse anyone accepts when production breaks. The assistant writes the draft. You are still the author. And the author, sadly, is the one who writes the bug report.