Test Driven Vibes — Royal Icing

April 2, 2025

Test Driven Vibes

Test-driven development (TDD) is the perfect match for vibe coding.
Here’s how it works:

Write out a test (don’t generate this part).

Test-driven development (TDD) is the perfect match for vibe coding.

Here’s how it works:

  1. Write out a test (don’t generate this part).
  2. Check that it fails.
  3. Generate the solution.
  4. Check if it passes. If not, repeat by generating another solution.
  5. Refactor by hand while ensuring tests still pass.

I call it test-driven vibes.

Source: Test Driven Vibes — Royal Icing

OK, we have to get one thing straight.

When Andrej Karpathy coined the term ‘vibe coding’ eons ago (actually less than 2 month ago) he did not mean, as Simon Willison has observed, all code generation with LLMs.

Karpathy wrote (sorry, I am no longer linking to X/Twitter but Simon does if you want the original context)

There’s a new kind of coding I call “vibe coding”, where you fully give in to the vibes, embrace exponentials, and forget that the code even exists. It’s possible because the LLMs (e.g. Cursor Composer w Sonnet) are getting too good. Also I just talk to Composer with SuperWhisper so I barely even touch the keyboard.

But the ship has probably sailed.

So what Patrick Smith is referring to here, where he expressly couples Test Driven Development with LLM generated code is by Karpathy’s definition not vibe coding.

But it is very interesting.