🤖 AI writes code that works — not code you'll want to maintain (at least not by default)
Recently, I built and launched an app called Leeway in about 10 hours. I wanted to see what would happen if I fully leaned into AI, no overthinking or polishing, just vibe coding 😎. I focused only on whether each feature worked, without paying attention to how the generated code looked.
The crazy part is it shipped 🚀. It passed tests, ran smoothly, and got approved on both stores. So I assumed everything under the hood was fine 😇.
Today I opened the codebase, preparing for the next version… and wow. It was working code, but not the kind of code I'd want to maintain long-term. Simple things like the calculation of a field were done by pulling entire tables from the database and looping through entries instead of using a SQL SUM. Lots of similar shortcuts that technically worked but weren't ideal.
It then made me realise something important: AI does not automatically write high-quality code. It writes whatever gets the job done unless you guide it with constraints, patterns, and examples.
This is not a complaint, but a reminder: if you want AI to code like a senior engineer, you need to teach it the rules, the structure, and the context. When you don't, it behaves like a junior dev🤓 who's eager to give you something that "works," even if it's not the best way.
Still, the speed was unreal 🤯. And the second pass — refactoring with clear instructions — is becoming a great learning experience.
Note: I haven't noticed this problem as much when using AI inside mature projects. Maybe because the rules/instructions where generated from the codebase and the existing codebase gives the model better patterns to follow, so the quality stays higher.