Coding with AI - Lessons learned
Geschreven op 17 November 2025
I’ve been spending the past few months coding with AI. Here’s what I’ve learned so far.
Design before you delegate
Your own job is to build a smart architecture and data model. Use your unique creative thinking, and your own experience. For example, I never want to deal with timezones, so everything is always UTC until it’s displayed. That’s a decision the AI won’t make for you.
But you can’t plan everything upfront. You will iterate. Sometimes your idea just doesn’t work. This means you need to refactor all the time. It’s ok. Make many small refactors. Don’t wait until big ones are needed.
Here’s the thing I keep coming back to: the quality of the AI output is directly proportional to the clarity of your thinking. Sometimes you need to iterate on your thinking first. Don’t rush if you don’t know yet. This is where the planning phase of an AI tool becomes crucial. You can iterate on the plan. If you’re not happy, or if it doesn’t feel right, just keep discussing.
Don’t treat the AI as a person
Don’t simply trust that it remembers the important stuff. Treat the AI as an excited intern that has its first day on the job, every time.
You sometimes need to be harsh and get it back on track. You don’t need to be polite. AI doesn’t get tired, or demotivated, or resentful that the specs didn’t cover this. If you’ve left something out, or get a new idea, just tell it to do it again. As humans we instinctively want to take the blame. “Ok this isn’t quite what I wanted, but I just asked it wrong, so it’s ok.” Stop doing that. It’s a tool.
If the work is not quite what you want, have it redone. Twice. Three times. Have it torn out. Roll back the changes. Doing that is dirt cheap, compared to having to change later.
Don’t assume the AI knows what’s the best solution
The AI can come up with wonderful technological ideas, but they may not work at all in your context. Remember: excited intern, first day on the job, there’s a lot it doesn’t know yet!
Ask a second opinion of a different AI tool. When they talk to each other, it often helps a lot, so set up an MCP with a different model, and have them discuss things. Second opinions are a lot cheaper than mistakes.
AI will build a cathedral when you need a shed
AI outputs tend to be over-engineered and overcomplicated. I’ve said “no, this is a very simple problem, make a simple solution” many times. And guess what, the AI then always confirmed I was right!
One of the problems I needed to solve was to find all possible flight routes from A to B. The AI came up with some algorithm, but with just logical thinking and using the prompt “explain the algorithm to me exactly”, I suggested a better way. It was 200x faster.
So look at what it made. Ask it to explain. Make offline test scripts for all key concepts to keep following along.
Context is your most precious space
Context will overflow and knowledge will be lost. Even systems like dev-docs fail when you do too much at once. Instead, make a plan, then make each step in a clean context. Make sure each step works exactly how you want it before moving on to the next step. Make sure the AI updates documents and tickets. This will keep context smaller by starting with a clear slate on every step.
Don’t waste context with MCP tools that you don’t need in every session. Check your context usage; in Claude code simply type /context for an overview. Disable what you don’t use.
You’re the pilot - pay attention to everything
Be vigilant. The AI I worked with once left out files from commits. I lost work because of that. So I banned certain git commands and systematized the workflow with hooks.
Always keep testing in your target environments. Set up your environment for quick testing, and make sure the AI can see the results of the test; often it can then iterate and fix bugs all by itself. But that only works if it can see the live feedback; investing time in a system that allows for this pays off infinitely. Just adding “You need to test this yourself, and iterate if needed” really helps.
Compound your learnings
Turn every mistake into an improvement. Test the improvements. You’re gaining valuable knowledge on creating with AI, so make sure you capture it.
Explore ways to use sub agents, skills, hooks, gems to keep the AI on the rails. The goal is to build a system that gets better every time you use it. And here too, test. Just ask the AI: Did you see the warning text? You’ll be surprised how fuzzy AI tools sometimes work.