Vibe Coding
What Is Vibe Coding
Vibe coding is directing an AI to write software in natural language while you stay responsible for the result.
The idea
You describe what you want. The model writes most of the code. You read the diff, run it, and decide what stays. The "vibe" is the conversation. The engineering is still yours: scope, tests, review, and shipping.
Andrej Karpathy popularized the phrase in 2025: fully giving in to the tools, forgetting the code exists, and iterating by talking to the model. That is the extreme. This course teaches a safer version that still moves fast: you stay in the loop on every slice.
In practice, a user works like this: open a real folder in an agent editor or CLI agent, write one goal, attach the files that matter, ask for a plan, let the agent edit a small piece, read the patch, run a command, then commit or revert.How You Work is the full session guide.Tools is how you pick the editor or agent.
Vibe coding vs writing every line
| You do | Classic coding | Vibe coding |
|---|---|---|
| First draft | Type it yourself | Ask the agent to generate it |
| Interface | Editor and docs | Agent chat plus files you attach, or a CLI agent in the repo |
| Your job | Author every line | Director, reviewer, tester |
| Speed | Limited by typing | Limited by how clearly you specify |
| Risk | Your own bugs | Silent bugs, extra files, wrong design |
When it works well
- Boilerplate: CLI setup, CRUD, tests, config, docs.
- Well-known patterns: a FastAPI route, a pytest file, a Pandas clean-up script.
- Refactors with a clear target: "extract this function, keep the tests green."
- Explaining unfamiliar code: "what does this module do, in 8 bullets."
When you should slow down
- Security, auth, payments, or anything that handles secrets.
- Unclear product: if you cannot describe done, the model will invent a product.
- Large rewrites across many files with no plan.
- Code you cannot read yet. Use the AI as a tutor, then write a smaller version yourself.
Vibe coding is not "accept all and hope." If you cannot explain a change, you do not own it. That is the line this course will keep repeating.
A tiny example
You could type this Python yourself. You can also prompt: "Write a function that returns the unique words in a sentence, sorted, ignoring case."
def unique_words(text: str) -> list[str]:
words = text.lower().split()
return sorted(set(words))
print(unique_words("Vibe vibe coding Coding"))
# ['coding', 'vibe']Your job after generation: check the types, empty input, punctuation, and whether split() is enough. That review step is the skill.
What a user actually does
Forget the slogan. Here is the work, in order, every time:
- Name the outcome — one sentence a teammate would accept as “done.”
- Point at files — the module to change and the test that will prove it.
- Constrain — language, no extra packages, files that are off limits.
- Generate a small slice — not the whole product.
- Read, run, keep or throw away — the chat summary is not evidence.
If you only do step 4, you will get code. If you do all five, you will get software you can maintain.
Try it yourself
Exercise 1: Which of these is vibe coding as this course means it?
- A) Paste “build me a SaaS” and accept every file.
- B) Ask for a typed helper, read the diff, run pytest, commit.
- C) Copy a 400-line dump from a chatbot into a file you never open.
Show solution
B. A and C skip review and ownership. The conversation is only useful if you still do the engineering steps.
Exercise 2: Write one sentence that would be a fair “done” line for unique_words.
Show solution
unique_words("Vibe vibe coding") == ["coding", "vibe"] and unique_words("") == [], checked by pytest.
Key takeaways
- You direct. The model drafts. You own the outcome.
- It shines on boilerplate and clear, local changes.
- It fails when the goal is vague or you skip review.
- Next, learn the session rhythm in How You Work, pick a tool, then set up a practice folder.