A post by Gonzalo Méndez, Tech Lead at Interactiv4

A few weeks ago, I attended CommitConf 2025, and—unsurprisingly—AI was the main topic. Technical talks, heated debates, a few fanboy moments… and a lot of questions about how AI fits (and disrupts) the way we build software.

One talk in particular, from the folks at Codely, showed just how easy it is to integrate an AI agent into an application. Easy, yes—but actually useful?

AI, the new Bluetooth?

AI has become the new buzzword. Everything needs AI. Like that electric toothbrush I bought years ago with Bluetooth (still no idea why). Now there’s a new version that proudly says “WITH AI” on the box. What does it do? Talk to me? Fix my brushing technique? Nobody knows. But hey, it has the label.

So yeah—your clients, our clients, everyone’s clients will ask for AI in their apps. Why? That’s for the business team to figure out.

How (not) to code with AI

I use AI every day. Not to integrate it into products, but as a coding companion. And yes, the way we work has changed. It’s evolving so fast that this article may be outdated in a few weeks.

There’s excitement, concern, and questions about whether it truly “learns”, how it writes code, and how much we can trust it.

One interesting stat I saw in a talk by @vilojona:

  • 29% of the code generated by Copilot is correct
  • 20% is partially correct
  • 51% is wrong

One thing it does have is creativity. AI tends to hallucinate—badly. If you’re not careful, it’ll give you a wild mix of DDD and Lord of the Rings in the same snippet.

So… do we just need to ask better?

What if we use a specific language to tell the AI exactly what we want?

Wait a minute… using a precise language to tell a machine what to do… sounds familiar? We already have that. It’s called programming.

AI might just be another abstraction layer—above the languages we use. But it still needs the same things: context, structure, and intent.

How to Get Decent Code (with AI as a Copilot)

Here are a few practices I apply (and recommend) when coding with AI:

🧠 1. Design first

Don’t start asking for code without knowing what you want. You can even chat with the AI about design patterns. Sometimes it gets them right—names and all, which I can’t always remember myself.

🧼 2. Keep your code clean

The clearer and more structured your code, the better the AI’s output.

🔧 3. Divide and conquer

Yes, it’s a cliché. SOLID and all that… But seriously: ask for small functions and classes. Don’t expect it to build a whole feature in one go. The longer or more complex the request, the higher the chance it fails or hallucinates.

Forget spaghetti code. It’s bad enough when humans write it. If AI does, it’s a disaster.

AI tends to hallucinate when overwhelmed. As @rafaoe and @javier.ferrer once said: “You’ll properly review a 50-line PR. A 5,000-line PR? You’ll say it’s fine and move on.” Same happens with AI.

🏷️ 4. Use clear names

Descriptive names help the AI autocomplete more accurately. It’s not magic—it’s prediction. But it works.

🧪 5. Test everything

Always. Especially if the code is AI-generated. TDD is your best bet. If you ask AI to write the tests, review them even more carefully than the code itself.

🌀 6. Refactor often

AI-generated code usually works… but it’s not elegant. Clean it up. Improve it. And trust your IDE—it knows more about your project than the AI does.

🏗 7. Clean architectures

AI won’t suggest them, but you should still design for scalability and maintainability. Future-you will thank you. And yes, your architecture will look cooler too.

Code Quality Still Matters

Some numbers:

  • In 2022, poor code quality cost the US around $2 trillion
  • Developers spend about 4 days per month fixing bugs
  • We spend 90% of our time reading code, not writing it

Still wondering why clean code matters?

AI and the Future of Engineering

My take? AI won’t take our jobs (at least not yet). But it is pushing us to be better engineers—not just coders.

It forces us to think about design, architecture, and structure.
It pushes us to keep learning.
And it raises two big challenges:

  1. Educational: How will new engineers learn to program if they just accept everything AI suggests?
  2. Business: How do we explain to decision-makers that the cheapest and fastest AI-generated code might be the most expensive in the long run?

I don’t have the answers. Just a lot of questions. The future of programming with AI is about as clear as my code on a Monday morning. I just hope that when the machines take over, they’ll at least have the decency to leave us the debugging jobs. Someone has to fix their existential bugs!

P.S.: The last paragraph was generated by AI. Yes, it tells jokes too. Sometimes. Funny ones? Well… 🤖