AI coding tools are genuinely great and genuinely dangerous, often in the same suggestion. They will write in thirty seconds something that would have taken you twenty minutes, and it will contain a subtle bug you would never have written yourself. Here is the workflow I actually use to get the speed without shipping the mistakes.
Use it where it is strong
AI is excellent at the code you find boring: boilerplate, obvious functions, tests, config, translating between languages, explaining unfamiliar code. It is weakest exactly where you need it most, the subtle, system-wide, high-stakes logic. Lean on it hard for the tedious 80 percent and stay in the driver seat for the tricky 20.
Read every line before it lands
This is non-negotiable. Never merge code you have not read and understood, no matter how confident the model sounds or how well it appears to run. AI-generated code has a special failure mode: it works in the demo and breaks on the edge case, because the model optimized for looking right, not being right. If you cannot explain why a line is there, it does not go in.
AI writes code that passes the happy path and quietly ignores the cliff edge. Your job is to walk to the edge and look down.
Make it justify itself
When it hands you something non-trivial, ask it to explain the approach and, crucially, what could go wrong. Ask for the edge cases it did not handle. This turns the model from an oracle into a colleague you are reviewing, which is the correct relationship. Half its bugs surface the moment you ask it to defend its own code.
Test the AI code harder, not softer
- Write or generate tests for the tricky paths, not just the obvious one.
- Feed it the malformed input, the empty list, the huge number, the thing a human tester would try.
- Assume it handled the common case and skipped the nasty one, because it usually did.
The takeaway
Let AI write the boring code fast, read every line before it lands, make it explain and defend the hard parts, and test its output like you distrust it, because you should. Do that, and you get most of the speed with almost none of the regret. Skip it, and you are just a faster way to ship bugs.