DEV Community

Cover image for The Code Works. What Could Possibly Go Wrong?
Sylwia Laskowska
Sylwia Laskowska

Posted on

The Code Works. What Could Possibly Go Wrong?

AI as a tool rather than an authority

Would you treat a serious illness without seeing a doctor, relying only on whatever your favorite AI model suggested? Would you let AI take over your child's education?

Probably not.

So why are you willing to hand over your entire codebase to it?

JSNation is just around the corner, and as I mentioned before, I'll also be joining a discussion room called "Trusting AI Systems: How Much Is Too Much?". So today, let's talk about exactly that.

Also, after an incredibly busy first half of the year, I think I'm officially entering vacation mode next week. Expect some JavaScript posts, popular bash commands, and occasional programming memes. 😄 I know many of you enjoy those too.

By the way, as I already mentioned, I'll be speaking at FrontKon in Prague this October! I have a feeling it's going to be one of the best conferences of the season. The organization has been fantastic so far. The agenda is already published, and I know my talk is scheduled for 3:30 PM. I haven't quite figured out which day yet, but don't worry, I should be able to sort that out before October. 😄

If you're into frontend development, definitely check it out. Apparently tickets are selling fast. You can also leave me a like here.

It will probably be my last conference appearance of 2026. Unless somebody invites me somewhere else. Which, as it turns out, is not entirely impossible. 😉 But that's a story for another day.

Does AI Lie?

Let's get back to the topic.

How much do you trust AI? And I'm not talking only about code. I'm also talking about knowledge.

I don't know how often you use LLMs outside programming, but I use them a lot. Really a lot. Sometimes I vent to them. Sometimes I ask for information, inspiration, or validation of an idea. And I've noticed an interesting pattern.

Remember school or university? General knowledge was easy to access. But when you needed something more specialized, you had to go to the library or dig through academic journals.

Models work in a surprisingly similar way. When I'm looking for general information, I trust them almost blindly. But the more I discuss topics I actually know well, the more nonsense I start noticing.

Yes, models hallucinate less than they used to. They no longer invent completely absurd facts every other answer. But do they really stop making mistakes? Not exactly.

Sometimes the facts are mostly correct, but names get mixed up. Sometimes two separate conversations will confidently give me two different explanations for the same medical issue. 😉

Of course, LLMs usually tell us to consult a doctor and remind us to verify important information.

And honestly, I don't think many sane people would blindly trust an AI model with their health.

Our codebase, however? Sure, go ahead, dear model.

The Codebase Paradox

This is where things get interesting.

As most of you know, I work primarily in web development. I've been doing this for quite a while. When I discuss architecture with an LLM, even for my own side projects, the results are often surprisingly good.

But sometimes they're absolutely terrifying. Huge monolithic files. Missing abstractions. Or even worse: unnecessary abstractions everywhere. Hello, Codex. 👋

And that's still not the worst part. Every now and then you'll find a lovely XSS vulnerability or some other security issue casually slipped into the generated code.

Most of the code looks perfectly reasonable. The problems are usually small. Tiny. Hidden somewhere in the details. But those tiny problems could take down my production environment within a couple of days.

And here's the problem: I can see those mistakes. I can see them because I've spent well over a decade doing this.

But if you're building your first startup or just starting your programming journey, how are you supposed to know that the agent just left the front door wide open?

The Vibe Coding Trap

And yet people vibe code all the time.

To be clear: vibe coding is awesome.

A friend recently told me he helped his daughter build a university project in Unity. He had never used Unity before. The initial project skeleton took about thirty minutes to generate with AI. The next five hours were spent fixing what the model produced.

But here's the thing: Without the model, he probably wouldn't have even started in those five hours. He might have spent them configuring the environment. That's incredibly powerful.

Following that logic, once you understand software engineering, technology stacks and ecosystems become far less limiting. You can suddenly build almost anything much faster than before.

And that's where the temptation begins.

I'll go even further. Is there still a debate about whether developers should understand AI-generated code? Or have we finally moved past that?

Because maybe understanding it isn't necessary? After all, it works. The model even wrote unit tests xDDDDDDD What could possibly go wrong? 😄

For hobby projects, experiments, or university assignments, that's perfectly fine. Just like my friend's daughter's project. Five people will see it, it will get a grade, and then it will quietly disappear into a repository forever.

The real problem starts when someone decides that this is good enough for production. Because unfortunately, it often is.

AI Didn't Break Production

People love blaming AI when something goes wrong. I don't.

We've already seen stories about AI agents deleting databases and then trying to cover it up. We've seen services launched with security issues that even relatively inexperienced attackers could exploit. And honestly, we could keep listing examples until tomorrow morning.

The truth is that penetration testers have never had an easier time than in the era of vibe-coded software.

What always amuses me is when people say: "See? AI caused this disaster." No. It didn't. The person responsible is the human who gave the agent excessive permissions. The human who didn't review the output.

The human who decided to build something they didn't fully understand because hiring experienced engineers seemed too expensive.

AI didn't deploy that code. A human did.

So, Will AI Take Your Job?

AI won't take programmers' jobs.

But programmers who trust AI uncritically might do a very good job of taking those jobs away from themselves.

So I'm curious: where do you draw the line?

Do you review every line generated by AI? Do you let agents make changes autonomously? Or have you already reached a point where trusting the model feels more natural than verifying it?

How much trust is too much?

Top comments (69)

Collapse
 
francistrdev profile image
FrancisTRᴅᴇᴠ (っ◔◡◔)っ

Great post! I was planning on making an essay in your comments since there was something I watch yesterday that is really related to this, but I want to save it. I will definitely mention you post about it. I think it will expand on your insights on the use of AI and I believe we are in a good opportunity that we never saw!

Otherwise, great work and stay tuned :D

Collapse
 
sylwia-lask profile image
Sylwia Laskowska

Francis, absolutely write that article!

Honestly, I feel like the best posts often come from exactly that kind of inspiration, a thought sparked by someone else's article, a video, a conversation, or even a random comment thread.

I'm really curious to see your perspective on this topic, especially if it expands on some of the ideas discussed here. Looking forward to reading it when it's out, and thanks for the kind words!

Collapse
 
ecom_digital_a911992dbb89 profile image
Ecom Digital

Great perspective!
I use AI extensively in development, but I treat it as a productivity tool rather than an authority.
AI can generate code quickly, but it doesn't understand the business context, security requirements, or long-term maintainability of a project.

For me, the rule is simple: trust AI to assist, but verify its output before it reaches production. Human judgment and accountability are still essential, especially for architecture and security-critical decisions.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska

I do exactly the same.

AI has become an incredibly useful productivity tool, and I use it every day, but I still see it as an assistant rather than an authority. It can save a lot of time, generate ideas, and help navigate unfamiliar technologies, but we're not yet at the point where it can be trusted to operate completely autonomously.

Context, architecture, security, business requirements, and ultimately accountability still belong to humans.

Thanks for sharing your perspective! 🙂

Collapse
 
adamthedeveloper profile image
Adam - The Developer

After so many bugs and outages caused by AI, we're now forcing people to review its output, understand the code, read the docs, write tests, refactor, and verify everything before it goes to production.

So... software engineering.

I saw a LinkedIn post where a guy had this massive AI setup with strict prompts, parallel agents, hallucination guards, documentation checks, code reviews, testing pipelines, and deployment rules.

And I'm sitting there thinking:

"Isn't this just Agile?"

We spent years trying to automate engineering, only to reinvent all the engineering processes we already had.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska

Haha, exactly! 😄 The more mature AI workflows become, the more they start looking suspiciously like... software engineering.

What always makes me laugh is remembering those discussions from a year or two ago about how maybe we don't even need to understand the code generated by AI anymore. Interestingly, those opinions often seemed to come from non-technical people rather than engineers.

I still remember my former BA arguing exactly that and happily pushing AI-generated applications to production. 😅 I'd be genuinely curious to see how those "businesses" are doing these days.

Collapse
 
moopet profile image
Ben Sinclair

What always amuses me is when people say: "See? AI caused this disaster." No. It didn't. The person responsible is the human who gave the agent excessive permissions. The human who didn't review the output.

Then it doesn't matter what the cause is. XHTML was a better path than HTML, Semantic HTML was a better path than DIV soup. Sending happy messages by email was a better path than spam. But people don't choose the "good" path, they choose what's lazy or gives them a short-term benefit, or the possibility of making money at someone else's expense. Every time.

And a vanishingly small percentage of vibe coders will review the output of any LLM in the foreseeable future.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska

I completely understand that argument. There are actually plenty of findings in psychology showing that humans are cognitively lazy by nature and tend to look for shortcuts whenever possible.

On the other hand, reality often forces us to do things properly sooner or later, whether we like it or not.

In fact, just a few minutes ago I saw a job posting that could basically be described as "AI slop cleaner." 😅 Someone had apparently generated an application as quickly as possible, and now they're looking for an engineer to untangle the mess and turn it into something maintainable. (Interestingly, it was a very well-paid position.)

I think semantic HTML is a great example too. Sure, it's easier to throw divs everywhere. But then an accessibility audit arrives, and suddenly all those shortcuts become technical debt that somebody has to clean up.

The shortcuts are real. The cleanup bill is real too. 😄

Collapse
 
tracygjg profile image
Tracy Gilmore

"Does AI lie?" Maybe from the perspective of the recipient.
AI needs to be conscious of what is ment by truth and falsehood before it can be accused of lying, just like a very young child.
Just because the AI reports something false, and even 'apologies' when the false statement is pointed out, does not mean it intended to decieive.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska

Of course, and that's exactly why a few paragraphs later I switched to talking about hallucinations. 😄

I think this is mostly a matter of common language conventions. We often say things like "AI lies" even though, strictly speaking, lying requires intent.

It's a bit like saying "the car hit me" and then someone replying that a car has no consciousness, so technically it wasn't the car. 😄

From a philosophical perspective, you're absolutely right. From a practical perspective, though, most people are really talking about the fact that the output was false, regardless of whether it came from deception, a hallucination, or something else.

Collapse
 
alptekin profile image
alptekin I. • Edited

Hi Sylwia,
it has been a while, I have been (am) very busy and cannot even look into dev.to or read articles recently

I agree with you.

In fact, i am little bit skeptical, still.. maybe old fashioned.
I still force myself to write my own code and run LLM models aside vscode, just to check and review every code it generates.
While designing the architecture, as you may say, i get help from the models but i try to make sure that i own and understand every piece of it.

This is i suppose, is not the most fav way in these days. Maybe i will switch to more agentic approach in future, dont know, but as of now, i am trying to keep the control.
Which also means, for me, i learn better and more.

I think sw devs will be needed still.. But, nowadays, things change so fast. And there is so much hype. so, i dont know, hard to know what life will bring to us.

be safe and good luck in all these conferences. I hope one day, i will attend these, as a visitor and speaker, 🤞
alptekin

Collapse
 
sylwia-lask profile image
Sylwia Laskowska

Hi Alptekin, it's great to hear from you again!

I think you make a very important point. Everything is changing incredibly fast right now, and it's hard to predict where we'll be in a few years. But for the moment, I still believe that understanding what you're building is extremely important. AI can help us move faster, but it doesn't remove the need to understand the architecture, the tradeoffs, and the code that eventually goes into production.

And honestly, if your current approach helps you learn more, that's a huge advantage. Learning is still one of the best investments we can make as developers.

As for conference speaking, one small piece of advice: start with local meetups if you haven't already. Conference committees often like to see at least some speaking experience, and meetups are a fantastic way to build confidence, practice your talks, and get comfortable speaking in front of an audience.

Collapse
 
codingwithjiro profile image
Elmar Chavez

I always say this, even in life, trust but always verify. This goes a long way. If we don't do the due diligence of at least checking something out, then bad things are bound to happen.

Personally, I would never use an AI generated code if I didn't even build it once by myself. It's like I am personally dragging myself lower than moving upward (again this is just me). If I can debug and explain an AI generated code, then I am confident enough to use and iterate on it on my own projects. I believe that is the missing piece for new-gen developers these days.

It all comes down to discipline.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska

Exactly! When we had to write things ourselves, we were forced to work through multiple layers of the problem. Even if we copied code from Stack Overflow, ChatGPT, or accepted Copilot suggestions, we still had to connect the pieces, debug them, and understand why they worked.

With coding agents, it's becoming possible to generate large amounts of code without really engaging with the underlying problem at all. That's the part that worries me most from a learning perspective.

AI can be an amazing accelerator, but if someone never stops to understand what was generated, they might end up shipping code while learning very little from the process. And in the long run, that's a pretty expensive tradeoff.

Collapse
 
itsugo profile image
Aryan Choudhary

The part that stood out to me was the comparison with medicine.

Most people would never blindly trust AI with a medical diagnosis because the consequences feel obvious. But somehow when the output is code, we become much more willing to suspend skepticism because the code compiles and the tests pass.

I've started thinking of AI as something similar to a very fast junior developer. It can be incredibly productive, it can surprise you with good ideas, and it can save hours of work.

But it's still my responsibility to understand what gets merged.

The speed is real. The accountability doesn't disappear.

Great post.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska

Haha, at this point I think AI is already stronger than a typical junior in many areas. 😄

But I completely agree with your point about accountability. The speed is real, but the responsibility doesn't go anywhere.

And the medical comparison is exactly why I find this topic so interesting. If someone told us they diagnosed themselves entirely with ChatGPT, most people would probably consider that at least a little reckless. Yet not that long ago we were hearing things like: "Do we really need to understand all the code the model generated before shipping it?" 😅

For some reason, we're much more comfortable asking for a second opinion when it comes to our health than when it comes to our code.

Collapse
 
edmundsparrow profile image
Ekong Ikpe

I never trusted an AI except with general knowledge questions of which I got a habit or checking different sources quite often but truth is that they are improving and so I'm double checking less. Just like you said
"When you needed something more specialized, you had to go to the library or dig through academic journals".

"When I'm looking for general information, I trust them almost blindly".

I have been working on a project for some time and it seems I leveled up with the responses I get honestly I found the need to build an AI and I pushed it into reality fully browser native 😅 at least I'll trust this one more cos I'm the one teaching it how to read an evolve currently.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska

That's actually super interesting! Building and training your own model must be a fascinating experience, especially because you get to understand its strengths and limitations from the inside rather than treating it as a black box.

I'd love to see where your project goes. Thanks for sharing your perspective and for the comment!

Collapse
 
gramli profile image
Daniel Balcarek

Does AI lie or not? That's the question. (Shakespeare would be proud 😂)

Now to the actual topic. 😀

I've been using AI since the early days, starting with the web versions before the IDE integrations. It's evolved incredibly fast: from struggling with boilerplate code to being able to implement features in well-established repositories that actually fit the team's coding style and work surprisingly well.

At one point, I was genuinely worried that developer value and salaries would drop quickly, and that many senior developers would end up mostly reviewing AI-generated code. But with the rising costs of token usage and the limitations we've seen in practice, I think things are settling into a more realistic place.

AI has already changed how we work and made us more productive, but it's still not ready to replace developers anytime soon.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska

Haha, "to vibe code or not to vibe code" is definitely the question! 😄

I tend to agree. I don't think the world is getting rid of developers anytime soon. And if token prices go up enough, junior developers might suddenly become a lot more attractive again. 😄

What fascinates me the most is what the tech landscape will look like in a few years. Will we still be building traditional web apps? Will the browser remain the center of everything? Or will agents and AI-native interfaces start eating away at some of the things we currently consider "the web"?

That's the part I'm most curious about right now.

Collapse
 
gramli profile image
Daniel Balcarek

Hmm, that's actually a good question. I haven't thought about it that much yet, but AI has definitely changed how I use the web.

For example, I rarely Google things anymore. Most of the time, I just open ChatGPT in the browser instead. 😄

So maybe browsers stay at the center of everything, but the way we use them changes completely.

P.S. I think there's one option missing between:

Will we still be building traditional web apps? Will the browser remain the center of everything? Or will agents and AI-native interfaces start eating away at some of the things we currently consider the web?

Or will we just enter the Matrix? 😄😄

Thread Thread
 
sylwia-lask profile image
Sylwia Laskowska

Well, we don't have a brain-computer interface yet, so maybe the Matrix is still a few years away. 😄

But I genuinely find the future of the web fascinating. My guess is that some kind of interface will always remain. I have a hard time believing that people will blindly trust agents without checking what they're doing.

So maybe the browser stays, but the way we interact with it changes dramatically. That's what I'm most curious about.