Vibe coding is a word tossed around a lots now a days, with software purists despising the thought, thinking it can only make garbage vs CEO’s wondering how they can use it to cut 100 workers and give themselves a larger bonus. The truth behind it however is much more simple. A user of any technical skillset can prompt an AI agent trained heavily on code to write them code based on their instructions.
This differs a bit in the way developers started using AI a couple years ago using it to source solutions that may only be found on the 3rd page of google, or quickly write some unit tests. Now you give this “Agent” full access to your file system, network, and terminal to run whatever it wants hoping that it gives you what you want. Being a purist and a prude stuck in my ways I was slow to give it a chance, on top of all the permissions it wanted. However I soon discovered a perfect use case to test it out! My own personal website!
Thats right this whole website is almost 100% vibe coded! I think this site is a perfect example of what vibe coding can be useful for. Something basic, common, and lots of boiler plate and setup.
Without going too in depth this site is built using astro why? Because raw html is boring and not scalable for dynamic content and because chatGPT recommended it. On top of that these frameworks have quick start commands like “npm create astro@latest” and you have your base. Now I just need the main page to include x things, and have my blog be available too. Super simple commands and instructions that are clear for an AI. I remember in university being told how coding is just telling the computer how to do things, but its really dumb so you need to be able to describe it at a very low and clear level. AI is just a level above that. Its still a baby so you need to be very clear and set clear boundaries.
As I stated though it is just a baby trying to give commands to a machine, so there is a lot of room for mistakes or misunderstandings. Even with something as basic as a static site there was a lot to be desired, and had to be further refined by adding more precise instructions. And as the next batch of commands went in and it rewrote sections of code it left dead code all over the place. It also built themeing and css for me. This eventually fell into a deep dark hole of classes on classes on classes with convoluted naming. Often I found there were small css changes that I wanted to make manually, but it was so hard to find specific classes things like adding margins were just easier to give to the AI. Spinning this hole even deeper as it adds a whole new class just for a small change.
There are however some tips to save you some headaches and to prevent ghost code. I would suggest treating each set of prompts as an individual ticket. For example if I wanted to create a new theme for the site. I would line out all the specifications I want: colors, images, effects, etc and bundle those into one prompt and run it. Hopefully it gives you what you like however if it does not I suggest two routes. If it is close you can further prompt it with very specific instructions, ones so clear there is no way it could get them wrong. If however there is a lot to be desired I would rollback the current changes and attempt your prompt again with more clear instructions. Once that is complete create a PR or merge into your branch. Then from a new prompt box with a cleared context build your next feature. Keeping a clean context will help the models keep your most recent prompts at the front of their mind and not throw in a random item you had 5 prompts ago. It also helps you if you ever need to rollback a change and keep ghost code to a minimum.
I however am just scratching the surface, and I believe with well defined requirements and building the application in a scalable modular way with features that touch very specific parts one can get very far with vibe coding. However the most successful vibe coders are going to be successful programmers. It is important to know the underlying technologies so that when you work with the higher level ones you know the capabilities.
Vibe coding definetly has a strong future and while it is very strong at building full applications it is important for individuals to understand a code base. It will see its success in elevating programers with solutions that they can then verify and test.