A Woman doing vibe coding

How to Vibe Code efficiently

The new buzzword in Artificial Intelligence, AI Townsquare is Vibe coding, developed by coders to build and popularized by masses to use AI prompts to generate cool new things.

Although, the use of Large Language Models, LLMs has been in use for quite some time now, in fact since November 2022, when OpenAI released ChatGPT for public use, but the exact term “Vibe coding” was coined by Andrej Karpathy- “We’re now entering the era of vibe coding. You don’t read the code, you don’t understand it, you just keep prompting until it does what you want and then you forget it exists.”

Vibe here refers to its Gen-Z use, meaning, feeling or mood.

Essentially, Vibe coding can be defined as building or developing software, by talking to AI, and iterating the process until the code works.

The workflow is quite simple and easy to follow-

First, we need to have a Product Requirement Document, PRD, which has all the detailed requirements of what we need to build/deploy. Features, design and User Interface.

Once, the AI knows what we are trying to build and how the end result is supposed to look like, it can start coding and we can use and test the generated code, and give feedback to AI, of the changes that may be needed in initial version of the code.

While vibe coding sounds nice and straightforward, it can sometimes run into errors while building or compiling the code, which can get frustrating and tiresome. In these kinds of situations, while not being an actual coder can be a problem, but advance in AI has even enabled them to detect and suggest fixes in the code, debugging, if we share the context and screengrabs if possible.

Context is an important tool while asking the AI to fix the errors or roadblock being faced in the code that is given and tests resulted in error, if we provide complete context of the environment which caused the error, then AI might be easily able to spot them and fix them.

So, when vibe coding, being prepared in advance for what we need as an end result, and having patience if any glitches or minor blocks occur, can go a long way to code, using LLMs, without being an actual coder and being an efficient Vibe coder.

The precautions to keep in mind when doing employing LLMs to build are what any AI app has in its disclaimer- that AI can make mistakes, and we should be cautious while using AI generated code. Also, it can be possible that AI can produce code that is not strictly authentic, and can be plagiarized from different sources. A third caution is against hallucinations of LLMs, they are quite certain they are correct even when they may be at wrong.

Tools- while the reader is free to search around and use the tools of his/her own choice, here are some suggested tools which can be used for Vibe Coding-

Replit, Cursor, Github CoPilot, and Google AI Studio

Happy vibe coding!!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top