logo
63

Vibe Coding in Practice

⏱️ 35 min

Vibe Coding: You Own the Requirements, AI Handles the Speed

What you're probably confused about right now

"Can't I just throw my requirements at AI and call it a day?"

Just tossing requirements usually gives you unstable output. You need to own the boundaries, acceptance criteria, and iteration.

One-line definition

Vibe Coding is a collaboration model: humans set goals and constraints, AI assists with implementation and iteration.

Real-life analogy

You're the architect, AI is the construction crew. Unclear blueprints mean lots of rework.

Minimal working example

Role: Python engineer
Task: Build a TODO CLI
Constraints: Standard library only, JSON persistence, error messages
Output: Code + test cases

Quick quiz (5 min)

  1. Write a structured prompt.
  2. Have AI generate a first version.
  3. Give 3 code review feedback items.

Quiz answer guide & grading criteria

  • Answer direction: write runnable code that covers the core requirements and edge cases from the prompt.
  • Criterion 1 (Correctness): Main flow produces correct results, key branches execute.
  • Criterion 2 (Readability): Clear variable names, no excessive nesting.
  • Criterion 3 (Robustness): Basic protection against null values, type errors, or unexpected input.

Take-home task

Run two rounds of prompt iteration on the same task and compare output quality.

Acceptance criteria

You can independently:

  • Define clear requirement boundaries
  • Review AI-generated code and spot risks
  • Drive AI through iterative fixes

Common errors & debugging steps (beginner edition)

  • Can't read the error: start from the last line -- find the error type (TypeError, NameError, etc.), then trace back to the line in your code.
  • Not sure about a variable's value: throw in a temporary print(var, type(var)) at key points to verify data looks right.
  • Changed code but nothing happened: make sure the file is saved, you're running the right file, and your terminal is in the correct venv.

Common misconceptions

  • Misconception: if AI code runs, ship it.
  • Reality: you must review, test, and cover edge cases.