Vibe Coding: Can AI Replace Traditional Programming? A Live Experiment with ChatGPT
Introduction
Overview of Vibe Coding
In this blog post, we will explore Vibe Coding using ChatGPT—a method that eliminates the need for prior coding knowledge. Instead of writing code from scratch, you can simply provide prompts to the AI, guiding it to generate the necessary code for your project.
The process is straightforward:
- Prompt the AI – Describe what you need, and ChatGPT generates the code.
- Test the Code – Run the provided code to check if it works as expected.
- Debug with AI Assistance – If the code produces errors or incorrect outputs, simply copy and paste the issue back into ChatGPT.
- Iterate Until Success – ChatGPT refines the code through multiple iterations until a functional output is achieved.
This approach shifts the focus from learning and debugging to building a product efficiently. Instead of getting stuck on the technical aspects, you leverage AI to accelerate the development process.
Now, let’s put this into practice and see how well ChatGPT can assist us in Vibe Coding!
Objectives
We will attempt to solve a complex problem using Vibe Coding with ChatGPT. The goal is to observe how many iterations are required to achieve a working solution. Additionally, we will address some of the challenges and limitations of Vibe Coding, providing insights into its effectiveness and potential pitfalls.
Problem Statement: Generating a KNN Algorithm Video with Manim
Generate Python code to explain the KNN algorithm using Manim videos. So what you would do is to generate a mathematical creation package called Manim to explain a machine learning algorithm called K&N. This is a little complex problem, and let's see how Vibe coding performs on this, how many errors we get, how many iterations would be required.
First Iteration: Generating Initial Code with ChatGPT
If you look at the ChatGPT interface. If you are practically following the instructions in this post you'll notice that once the code generation is complete, you have the option to run it immediately. When the code is ready, we will copy and paste it. Additionally, ChatGPT has provided another snippet, which we can review and execute as well.
Handling Errors and Refining the Code
Installing Manim and Resolving Dependencies
Now, let's move forward with the process. ChatGPT has provided a command to install the necessary package using pip install
. At this stage, we won’t be providing any additional prompts—we will simply execute the given command and observe the results. Let’s run it and proceed from there.
Observing Logical Issues in KNN Explanation
Now, we have encountered an issue. Instead of trying to resolve it manually, we will copy and paste the error back into ChatGPT and ask for a solution. As you can see, ChatGPT has now suggested a different approach. Let’s implement this new suggestion and see if it works.
This iterative process of debugging—testing, reporting errors, and receiving corrections—can feel tedious for experienced programmers who are already familiar with coding. However, for those who are new to a particular library or lack coding experience altogether, this method can be highly effective. It eliminates the need to start from scratch and provides a structured way to troubleshoot and refine the code efficiently.
Multiple Iterations: Debugging and Improving Output
Now, we have encountered an issue. Instead of trying to resolve it manually, we will copy and paste the error back into ChatGPT and ask for a solution. As you can see if you are practicalizing, ChatGPT has now suggested a different approach. Let’s implement this new suggestion and see if it works.
This iterative process of debugging—testing, reporting errors, and receiving corrections—can feel tedious for experienced programmers who are already familiar with coding. However, for those who are new to a particular library or lack coding experience altogether, this method can be highly effective. It eliminates the need to start from scratch and provides a structured way to troubleshoot and refine the code efficiently.
Observations on Efficiency and Complexity Handling
Evaluating ChatGPT's Performance in Vibe Coding
Based on my observations, ChatGPT performs well for basic coding tasks but struggles with more complex, intermediate-level problems. While it provides useful guidance, it may not always be the most efficient solution for advanced coding challenges.
Now, let's test whether it can successfully install Manim using pip install
. This time, it looks like we have successfully completed the installation. This demonstrates that while ChatGPT can be helpful, it may require multiple iterations to achieve the desired outcome, especially for more intricate tasks.Evaluating ChatGPT's Performance in Vibe Coding
Based on my observations, ChatGPT performs well for basic coding tasks but struggles with more complex, intermediate-level problems. While it provides useful guidance, it may not always be the most efficient solution for advanced coding challenges.
Now, let's test whether it can successfully install Manim using pip install. This time, it looks like we have successfully completed the installation. This demonstrates that while ChatGPT can be helpful, it may require multiple iterations to achieve the desired outcome, especially for more intricate tasks.
Final Output Evaluation
Assessing the Quality of the Generated Video
I think the installation is done. Let's try rerunning the code and let's see at what point we get stuck this time. I think it ran, but it is giving some problems. I know what problem it is throwing—it is asking us to save this particular code into some file. So let me ask ChatGPT only. I got this error, now what it says?
Strengths and Weaknesses of Vibe Coding
So as it is mentioned, save the file as knn_explorer.py. So now we will do that too. I just wish to see how many iterations it will take for me. Right now we have done three to four copy-pastes, but I don't know anything about Manim. So I think if that's the case, going and learning everything from scratch, it's better you try out something like this.
The Importance of Human Oversight
We will create a new file as it has mentioned: knn_explorer.py. So we will copy-paste the code here now and save it as mentioned by ChatGPT. We log in, track rerunning the code. I think some execution has started and a video is created. What it has generated, as you can see—classification as A. It's not correct. It's incomplete. As I can see, classified as A. So it is just giving a seven-second video. Let me prompt it a bit more to update the code for us.
Conclusion and Future Experiments
As you just saw, if you were following pratically ChatGPT was able to generate a decent solution. This highlights an important takeaway: if you're working on an objective problem and can clearly articulate what you need, your initial prompt can be a game-changer in Vibe Coding. The better you define your request, the more effective and accurate the AI's response will be.
Limitations of ChatGPT’s Coding Abilities
As you observed, the prompt I provided was quite minimal, which directly influenced the outcome. Since the input was brief, the generated result was also quite simple. However, this aligns with expectations—the level of detail in your prompt directly impacts the quality and complexity of the output.
Future Testing with Cursor and Claude 3.5
We will be exploring Vibe Coding with other tools as well. In the next blog post, we’ll try it out with Cursor to see how it compares. Stay tuned!