Join 5000 CTOs and engineering managers for opinionated insights Subscribe

Stephan Schmidt - October 13, 2025

The AI Coding Illusion

Why AI Code Isn’t What You Think—And Why It Matters for Developers


AI is not what you think!

Most people, especially people working in software and product development, have a misconception of AI.

Many people think of AI as a trained engineer in software development. They assume the AI is trained by GitHub and Reddit code examples and learns how to solve problems with pieces of code. The AI uses those snippets to construct the code you want it to create. They humanize AI and think it’s working as a trained engineer who looks at your code, thinks hard about the best solution and then writes the code. Claude Codes comments while it is working are not helping, they support this misconception.

But the AI is a probability machine, not a thinking and calculating engineer. The training of the AI with code is training probabilities, not thinking. The AI can do one thing: generate reading tokens and generating tokens. It takes your code, reads it as tokens and then generates the code that is most probable to exist.

The implications are huge. The biggest implication is that the quality of the code the AI generates depends on the quality of your code.

People think, just like a good engineer, the AI looks at the code and generates the best code based on its training. But the AI is not trained by code examples to think about coding and making decisions like an engineer about what the new code should look like. It generates the code that best fits YOUR EXISTING code. It depends more on your code than on the code it is trained on. If you don’t like the generated code, this means your code is bad, not the training code was bad as engineers are quick to tell you.

If your code is bad, the AI will generate bad code. If your code is great, it will generate great code - whereas an excellent engineer would generate great code, independently of the existing code. That is the biggest difference between an AI and an engineer and the biggest misconception of AI

This can be seen when starting from scratch. The AI generates bad code if it does not have any code to work on. It adds all new code to one file. It has long methods. The code gets more and more dependencies and spaghetti characteristics until the AI itself struggles to change it. When you stop after some iterations, refactor the code to more methods, add proper error handling, split the file into several files, the code the AI generates THEN is much better. With guardrails in place it will generate good code over time. Without refactoring, without showing the AI what it should do, it generates worse and worse code. If you start from scratch you need an excellent project template for the AI to work on, otherwise you’re lost. Perhaps this is where Loveable shines; your projects internal code does not start from scratch but on great templates I assume.

You will be more successful with AI coding if you think of it as a probability machine, not a thinking and calculating engineer.

My Book for CTOs Amazing CTO Book
Join 5000 #CTOs and engineering managers for weekly insights
- no ads, no sponsorships, free.