The Truth About AI and "Vibe-Coding": Will Programmers Be Replaced?
A common concern among programmers is whether AI will eventually replace them. The emergence of terms like "Vibe-Coding" only fuels this anxiety. Let's examine how AI currently writes programs and what "Vibe-Coding" actually entails. The reality is that AI's programming capabilities are still limited, despite recent advancements.
How AI Currently Writes Programs: The Role of AI Agents
Initially, using AI for programming involved a cumbersome process of copying and pasting code between the programmer and the AI chatbot. Large language models (LLMs) are essentially just chatbots, able to respond to messages but unable to directly access local files. To overcome this limitation, programmers introduced an intermediary layer: the AI Agent.
-
An AI Agent is a small, locally running program.
-
Programmers pre-define functions for the Agent, such as
read_file
,write_file
, andlist_file
, enabling file I/O operations. -
The AI Agent combines these function details with the user's prompt and sends it to the LLM.
-
The LLM then instructs the Agent to call specific functions with designated parameters, indirectly modifying files.
AI Coding Plugins and File Manipulation
In VSCode, AI coding plugins function as AI Agents. They leverage VSCode's APIs to read and write code. Some plugins can even browse the web and execute terminal commands. This allows the AI to actively modify code.
Diff Format: A More Efficient Approach
The most straightforward method for AI to modify code would be to regenerate the entire file. However, this is inefficient and prone to errors, especially with larger files. Instead, most AI programming tools use the diff format.
-
The diff format specifies which lines in which files need to be replaced with new content.
-
This format is well-established, used in version control systems like Git and SVN.
-
LLMs are trained on vast amounts of internet text, including diff-formatted content, making their responses more reliable.
Ensuring Accuracy and Contextual Understanding
Even with the diff format, AI responses aren't always perfect. After receiving a diff, the AI Agent checks if the original code matches the current file. If there's a mismatch, it tries again to avoid errors.
To improve accuracy, AI programming tools collect contextual information from the IDE. This includes:
-
Project file structure
-
Currently viewed file
-
Open files
-
Command-line output
-
Current time
By feeding this information to the LLM, the AI gains a better understanding of the situation, leading to smoother programming.
MCP: Expanding AI Capabilities with Plugin Systems
Now, you can write a program with a prompt, the AI diligently builds the program. Sounds like you're about to be replaced, doesn't it? While AI can write code, deploying it presents challenges. Tasks like front-end deployment, back-end service configuration, and database setup remain difficult for AI. To address this, programmers have developed MCP (Modular Component Packages).
-
MCP is a plugin system for AI programming bots, similar to browser extensions.
-
It enables the AI to install new skill packs and perform tasks it couldn't originally handle, such as operating cloud servers and configuring databases.
-
Cloud platforms are launching MCP Servers to connect with programming bots and facilitate deployment.
Cloud Platform Integration and Project Templates
However, after deployment, the website's code needs to interact with cloud services, like reading and writing to its own database. Since each cloud platform has different APIs, the AI must know which platform the program will be deployed on.
Furthermore, some cloud services are too new for the AI to know about. To mitigate this, cloud platforms provide:
-
Complete project templates with necessary libraries and configuration files.
-
Pre-written prompts that guide the AI on how to access data, deploy, and read documentation.
The Complete AI-Assisted Development Process
The complete process involves:
- Opening a cloud service's project template.
- Prompting the programming bot for assistance.
- The bot collects IDE information and reads template prompts.
- All of these informations are packaged and sent to the AI model.
- The model generates code compatible with the cloud service and returns it in diff format.
- The programming bot verifies and applies the modifications.
- The user instructs the bot to deploy the website, using the cloud service's MCP to complete the deployment tasks.
This automation can achieve zero-basis coding and deployment for simple projects. This seamless experience is what some call "Vibe-Coding."
Conclusion: Augmentation, Not Replacement
Ultimately, AI programming tools augment programmers, not replace them. These tools allow programmers to focus on higher-level tasks and ideas, instead of getting bogged down in the details of every line of code. AI may replace the act of typing, but it doesn't replace the creativity and problem-solving skills that define a programmer.