How it works
Instead of typing code line by line, you talk to an AI coding assistant: βMake a page where I can add expenses and see the total for the month.β The AI writes the code, runs it (in many tools), and you react: βMake the total bigger, and sort by date.β Under the hood, these assistants are AI agents: they plan, edit files and run commands in a loop.
π£οΈDescribe
One small, clear change
π€AI writes code
Edits files, maybe runs it
π§ͺYou test
Click through it, try odd inputs
πΎSave a version
Git commit when it works
πNext small step
Good vs bad requests
| β Vague | β Clear and small |
|---|---|
| "Build me an expense app" | "Create a single web page with a form (amount, category, date) and a list of expenses below it. Store them in the browser." |
| "It's broken, fix it" | "When I add an expense with no amount, the total shows NaN. Ignore empty amounts and show a message instead." |
| "Make it better" | "Add a filter for this month only, and show the monthly total at the top." |
A safe step-by-step workflow
- Write a short plan first. What the app does, who uses it, what it must never do. Ask the AI to suggest a plan and edit it.
- Build the smallest working version. One screen, one feature.
- Test it yourself after every change: normal use, empty inputs, weird inputs.
- Save working versions with Git, so you can undo a bad change in seconds.
- Ask the AI to explain code you don't understand, and to write tests for important parts.
- Review before sharing: secrets, permissions, data handling.
I want to build a small expense tracker web page for myself.
Version 1 only:
- A form with amount (number), category (Food, Travel, Bills, Other) and date
- A list of expenses, newest first, and the total for the current month
- Save data in the browser (localStorage); no login, no server
Please first show me a short plan and the files you will create.
Keep it simple. Don't add features I didn't ask for.Where vibe coding shines, and where it doesn't
β Great for
Prototypes and demos
Personal tools and scripts
Learning how code works
Boring boilerplate for developers
β οΈNeeds real review
Payments and money
Logins and private data
Health, safety, legal
Apps many people depend on
The risks, and how to avoid them
| Risk | What happens | Protect yourself |
|---|---|---|
| Confident mistakes | "All done!" but a feature silently fails | Test every change yourself |
| Security holes | Exposed data, weak logins | Never ship logins/payments without review |
| Leaked secrets | API keys pasted into code end up public | Keep keys in environment variables; never commit them |
| Spaghetti code | Each fix breaks something else | Small steps, tests, and asking the AI to tidy up |
| Made-up packages | AI suggests a library that doesn't exist (or a fake one) | Check packages are real and popular before installing |
Vibe coding works best when you understand the basics of what you're building. Our free Development courses (React and Node.js) teach exactly that.
π― Spot the pattern: is it a good vibe coding project?
In an interview nobody tells you the pattern. Read each problem and decide. Look for the signal words.
1. A weekend tool to rename your holiday photos
2. A shop's checkout page that takes card payments
3. A quick prototype to show your team an idea
4. A hospital system storing patient records
5. A study timer web page for yourself
π― Interview questions on this topic
Try to answer out loud first, then tap to check.
Q1How do you use AI coding assistants responsibly?Fresher+
Q2What are the security risks of AI-generated code?1β3 yrs+
Q3How would you make an AI-built prototype production-ready?1β3 yrs+
Q4How do you get better results from coding agents on a real codebase?3+ yrs+
Key takeaways
- βVibe coding lets anyone build small apps by describing them.
- βThe safe loop is small steps, testing and saved versions.
- βTreat AI code like a fast junior's work: useful, but review it.
- βLearning the basics makes vibe coding far more powerful.
Frequently asked questions
What is vibe coding?
Building software by describing what you want to an AI assistant in plain language and letting it write the code, then testing the result and asking for changes. The term was popularised in 2025 by Andrej Karpathy.
Can I vibe code without knowing how to program?
You can build small personal tools and prototypes. To build anything people rely on (with logins, payments or private data) you need to understand the code well enough to review it, or work with someone who does.
Which tools are used for vibe coding?
AI coding agents in the terminal or editor (such as Claude Code, Cursor, GitHub Copilot) and browser-based app builders. They differ in features, but the safe workflow in this lesson works with all of them.
Is AI-written code safe?
Not automatically. It can contain bugs, security holes or outdated libraries, and it can look convincing while being wrong. Test it, review it, and never paste secrets into prompts or commit them to code.
Will vibe coding replace programmers?
It changes the job more than it removes it: less typing, more describing, reviewing, testing and designing. People who understand software get much more out of these tools.
π§ Quick check: vibe coding
1. What should you do BEFORE asking the AI to build a big app?
2. The AI says 'Done! Everything works.' You should...
3. Why use Git while vibe coding?
4. Which is the riskiest to vibe code without review?
Checking your accessβ¦