Back to Blog

The Hidden Risks of Vibe Coding: When AI Builds Without You Looking

EN 🇺🇸Article8 min read
#AI#LLM#Software Engineering#Productivity#Risk Management

Imagine asking an AI to build a web application, tweaking its features and design with natural language, and never once looking at the underlying code. Sounds like a developer's dream, or perhaps a non-programmer's shortcut to building tools. This approach, aptly coined "vibe coding" by Andrej Karpathy, embodies the allure of exponential speed and accessibility that LLMs promise.

Vibe coding is the practice of having a large language model generate and modify software based solely on high-level prompts, with the human operator intentionally avoiding any inspection or review of the generated source code. While it promises unprecedented development velocity, particularly for those without traditional programming skills, embracing this "forget that the code even exists" mindset introduces significant, often hidden, risks that professional engineers must understand.

What Vibe Coding actually is

Vibe coding refers to building a software application by iteratively prompting an LLM for changes and features, without ever looking at the code the LLM generates. The user interacts exclusively with the application's observable behavior, providing feedback in natural language like "decrease the padding on the sidebar by half" or "add a new button here." It's a method where the developer fully gives in to the "vibes," treating the LLM as an opaque black box that simply delivers the desired functionality.

Think of it like ordering a custom meal at a restaurant where you only describe the taste you want, and the chef (the LLM) creates it without you seeing the ingredients, the cooking process, or even the kitchen. You trust the output, but you have zero visibility into how it was made. The core mechanism relies entirely on the LLM's ability to interpret natural language, generate functional code, and respond to iterative feedback, all while abstracting away the code itself from the user.

Key components

Concept in action

  1. User prompts: "Build a simple web app that displays a list of tasks and allows users to add new ones."
  2. LLM generates: The AI generates initial code for the web app, including frontend UI, backend logic, and database scaffolding.
  3. User tests/observes: The user runs the generated app, sees a basic UI, and identifies a desired change, perhaps a styling adjustment.
  4. User prompts refinement: "Make the title font larger and bold, and decrease the padding around the input field."
  5. LLM modifies: The AI modifies the relevant CSS and HTML/component code without the user seeing or reviewing the specific changes.
  6. User accepts/iterates: The user observes the visual change, confirms it, and continues requesting more features or bug fixes, always interacting at the application's behavioral abstraction layer.

Why engineers choose it (or are tempted by it)

The appeal of vibe coding is significant, especially given the continuous advancements in LLM capabilities. Even experienced engineers can find themselves drawn to its promises:

The trade-offs you need to know

While seductive, the "forget that the code even exists" mindset of vibe coding moves complexity rather than removing it. This approach comes with severe inherent trade-offs:

When to use it (and when not to)

Understanding the inherent risks is crucial for making informed decisions about when, if ever, to engage in vibe coding.

Use it when:

Avoid it when:

Best practices that make the difference

While the spirit of vibe coding is to avoid looking at code, for any serious application of LLM-assisted development, adopting best practices is essential. These practices differentiate effective agentic programming (where LLMs are co-pilots) from the pitfalls of pure vibe coding.

Understand the "Agentic Programming" distinction

Recognize that agentic programming is a more mature approach where engineers do review, debug, and care about the LLM-generated code. They use AI as a powerful co-pilot, not an opaque replacement. This critical distinction moves beyond disposable software and leverages AI effectively, maintaining human oversight and accountability.

Start with clear, constrained prompts

When interacting with an LLM for code generation, define the application's purpose, scope, architectural constraints, and desired output formats explicitly. The less ambiguity in the initial and subsequent prompts, the better the LLM's output will be, reducing the need for "random changes until it goes away" fixes.

Implement rigorous testing and validation

Even for code generated with LLMs, robust testing is non-negotiable. Unit tests, integration tests, and security scanning are crucial. For applications where code quality is uncertain (as in vibe coding), this often means treating the entire application as a black box and relying heavily on comprehensive end-to-end and fuzz testing.

Establish strict sandboxing and access controls

If experimenting with LLM-generated applications, always run them in isolated, sandboxed environments. Limit their access to sensitive systems, confidential data, or critical network resources to significantly mitigate potential security risks and prevent unintended side effects. Treat generated code as untrusted until proven otherwise.

Wrapping up

Vibe coding presents a tempting, almost magical, vision of software development where complex technical details vanish. The immediate gratification of seeing an idea manifest into a functional application, even without touching a line of code, is undeniably powerful. However, this power comes at a severe cost: a complete surrender of control, understanding, and accountability over the software's internal workings. It is a shortcut that often leads to a dead end.

For professional engineers, the key distinction lies in awareness and discipline. While rapid prototyping for truly disposable tools can be a niche application, the vast majority of software demands rigor, security, and maintainability. The path to robust, secure, and evolvable systems requires engineers to remain in the loop, critically evaluating, testing, and understanding the code, whether it originated from a human mind or an artificial intelligence.

Embrace AI as a powerful assistant, a force multiplier, but never as an opaque black box. Your expertise in architecture, quality assurance, and security is more vital than ever in guiding these intelligent tools. The future of engineering isn't about forgetting the code; it's about mastering new ways to collaborate with it, ensuring that we build software that truly serves us, rather than baffling or compromising us.

Newsletter

Stay ahead of the curve

Deep technical insights on software architecture, AI and engineering. No fluff. One email per week.

No spam. Unsubscribe anytime.

The Hidden Risks of Vibe Coding: When AI Builds Without You Looking | Antonio Ferreira