Vibe Coding is the novel way of building software where you describe your idea to an AI, and it will generate code for you. This approach, popularized by Andrej Karpathy, changes how one develops software by allowing most of the code to be primarily written by the AI, with human intervention only when needed.
While Vibe Coding allows for fast churning of code and immediate results, some raise concerns about code quality, security, and resource usage. At this point, it is clear that Vibe Coding can be beneficial for local experiments and prototyping, but taking it to production should be seen as a step too far.
Up until now, I have refrained from issuing an opinion since I haven't tried it myself. I have decided to get my hands dirty and try this new style for an hour to see what I can produce with it. Here I outline how it went.
Project
I wanted something simple, starting from scratch, so I chose to build a simple Alarm web app in vanilla JavaScript, HTML, and CSS. The only required feature was to input the time, click on a button, and play a sound once the timer reached zero.
Tools
The two most famous tools for Vibe Coding are Cursor and GitHub Copilot. Since I am an Emacs user, I didn't feel like using a different editor. Fortunately, Aider—an open-source alternative—exists.
Aider is a command-line tool that enables AI-assisted programming in your terminal. It supports all major AI providers, plus locally installed ones through Ollama and LM Studio. It works by scanning the root of the project and serving a REPL-like interface where you can issue commands and ask questions in natural language. These commands are differentiated by a slash at the start, like:
/ask Which function is responsible for parsing HTML?
or...
/code Write a function that counts the number of letters in a string.
The LLM of choice was ChatGPT 4, but I could have chosen a different model—a local one like qwen2.5-coder. However, I've decided to play it safe for this first experiment.
Code Quality
The code quality was not the best, but it could have been worse, honestly. As many have pointed out, you need to review the code. Blindly accepting what the LLM produces is a recipe for disaster.
The biggest issues I noticed were not adhering to DRY (Don't Repeat Yourself) principles and a lack of performing obvious abstractions. This might be what some call the "spaghetti generator," because there was indeed a lot of code that could have been avoided or abstracted into reusable functions.
However, I was happy to see that one of my refactor requests was executed correctly:
/code refactor timer.js to reuse variables defined by document.getElementById.
The end result was not something a Medior, let alone a Senior, would have produced. It likely would not have passed a serious PR review, but it was good enough for what I expected.
Speed
This part is difficult to measure because I could have possibly done the same in an hour without an LLM. At the same time, I spent a lot of time puzzling over how to word a prompt, since I am not used to Vibe Coding. Likely, someone more accustomed to this technique would have achieved the same in less time and with fewer prompts.
The best part for me, honestly, was sending the idiotic request:
/code Center the contents of the page using CSS and improve the look of the buttons.
I don't like to write CSS, so seeing it produce anything mildly acceptable in a couple of seconds was the best I could possibly come up with.
Cost
As I mentioned earlier, I started this project from scratch, and Aider kept a handful of files in its context window. I am still wrapping my head around token pricing when using LLMs, but the gist is clear: the more tokens you consume, the higher the bill.
In the end, I spent $0.32 for this session— a low price for a prototype, but also not something that anyone would buy.
Outcome
You can see here my simple Alarm web app.
Final Thoughts
I still don't have a strong opinion about Vibe Coding, or assisted coding if you prefer. The flow I enjoy as a developer was not present when I was working on this app, mostly because I am still getting my head around prompting. I was, nevertheless, content with the result, and I think it can help one overcome the blank canvas issue.