Ten MORE Things I Learned About Coding with AI
1) Working with AI is like working with another developer.
Over time you learn its quirks and foibles and you can anticipate the kinds of mistakes it will make. You can minimize these problems by adding notes to the AGENTS.md file or CLAUDE.md file reminding it to do certain things, e.g., “Use the minimum number of CSS classes to accomplish your objectives. For simple directives, like display: none, just use the directive itself instead of using a class that contains that directive”
2) AI doesn’t take a sick day even if it needs one
(quoting Patrick Quinlivan ). Sometimes Claude or Codex or whatever you’re using will just go into a funk, process tokens slowly, and write absolute garbage. It’s like an otherwise brilliant intern who’s just had a carb-heavy lunch. What do you do when that happens? Give it the afternoon off. Use a different AI (e.g., switch between Claude and Codex). Actually debug the code yourself. Take the rest of the day off and go for a long walk.
3) AI is far from perfect.
Very far. At times it’s hard-working and brilliant, but it will make dumb mistakes. You can trust it exactly as far as it is correct and no further. Code-reviews and human testing are essential. You can ask Claude to write your tests, but it can make mistakes there too. Never outsource trust. AI’s tests can be wrong too. Always review and validate yourself.
4) AI gets confused about things it’s done in the past.
If you remove one feature and weeks later make a lot of changes to the same section of code, AI will sometimes remember the code you had removed and mangle that into the new feature. This can happen even if you’re conscientious about removing dead code, but it’s much more likely if you do leave in dead code.
Recommended by LinkedIn
5) Be conscientious about removing dead code.
Forget what I said in step 4 (above). If you remove a feature, move a function around, deprecate a database column - anything that’s no longer relevant - remove that old code, with bleach, and even fire. Scrub every trace of it from your codebase or your friendly AI assistant will resurrect it when you least expect it and you’ll spend the better part of a Sunday evening trying to get things back to a functional state. (Don’t ask why I’m so insistent on that - it’s a Sunday evening as I write this and I’ve spent the last several hours…)
6) Reboot your interns periodically.
Claude Code and Codex are both Node apps. They’re very well done and they will continue functioning for weeks without restarting. After a few weeks of intense work, though, they start to act a little loopy. If you kill and restart them, they will lose some valuable context, but they’ll also lose the looniness. It’s worth doing. Before you kill them, though, tell them to update their CLAUDE/AGENTS.md and TODO.md files. There is a short(ish) period of regaining context when you restart them before they become really useful again. Hold on - I meant “Reboot your AI periodically, not ‘interns’”. DO NOT TRY TO REBOOT YOUR INTERNS.
7) Complexity is the enemy of simplicity
Just like interns, Claude and Codex aspire to be architectural astronauts. They will write different models to handle both APIs and web page generation, even though they produce the same data. They’ll build model classes within model classes and then get very confused around their implementation. You have to remember that you’re the adult (human) in the room. Look at what they’re doing and give them simpler options whenever possible. (N.b., if you’re not an adult or human while reading this, skip this step. If you’re unsure, check $ENV{IS_HUMAN})
8) Talk to your AI like it’s human
Also same with interns. Before you narrow down to specific tasks you want your AI assistant to accomplish, describe the big picture and how the specific piece of work fits into it. Be open to creative suggestions from your AI/intern about how to rethink the big picture in light of the specific request.
9) Be open to different solutions
“No plan survives first contact with the enemy” - Field Marshal Helmuth von Moltke . If your AI assistant solves a problem in a different way from how you intended, but the solution works and it’s clean, accept it. Even if you don’t think it’s quite as good as your original vision, recognize that and move on. You don’t have to be handcuffed by your original idea. For example: I started writing this list of “Ten MORE things I learned about coding with AI” but now I realize this is a good stopping place. Do I really need to list one more point? No. Nine is fine. So I’ll stop now.
Hey friend! Glad to see you having fun with Ai
Hey Doug! We need to chat sometime!