Rejecting Vibe Coding: 8 AI Programming Patterns Revealed

Explore Simon Willison's insights on eight AI programming patterns that redefine coding practices in the era of AI tools.

Rejecting Vibe Coding: 8 AI Programming Patterns Revealed

Silicon Valley developer Simon Willison recently released a unique guide.

Image 5

This guide is aimed at professional engineers, warning those who only engage in vibe coding to steer clear. With AI tools like Claude Code and OpenAI Codex capable of running code independently, are traditional engineering practices still applicable?

The time to generate hundreds of lines of code has been reduced from a full day to just minutes, rendering previous standards for determining whether writing code is worthwhile obsolete.

What Happens When the Cost of Writing Code is Zero?

Simon Willison states:

Code has always been expensive. Producing hundreds of lines of clean code used to take a whole day or more. Now, that’s a quantum leap from 8 hours to 5 minutes.

All engineering habits are based on the premise that writing code is costly. Product managers prioritize features based on development costs, and programmers weigh whether a piece of code is worth an hour of their time.

Now, this logic has collapsed. Refactoring takes only 30 seconds, generating tests takes 1 minute, and creating debugging interfaces takes just 2 minutes—every judgment of value must be reassessed.

Willison suggests:

When your intuition says it’s not worth it, just try a prompt; the worst case is discovering in 10 minutes that it wasn’t worth those few tokens.

However, he adds a sobering note: while code has become cheaper, good code remains expensive. It must run, be tested, maintainable, handle errors elegantly, be documented, and allow for future expansion. AI can generate code, but it cannot guarantee these qualities.

8 Patterns to Restructure Workflows

Pattern 1: Writing Code is Cheap. The cost of code generation is nearly zero, but delivering good code remains significantly costly.

Pattern 2: Hoarding Known Techniques. Archive all previously solved problems. Willison’s personal blog, TIL, and thousands of GitHub repositories serve as a “repository of techniques.” Why hoard these techniques? Because AI can recombine them. For instance, if you want to create a browser-based OCR tool that can handle PDFs, you might combine Tesseract.js (OCR library) and PDF.js (PDF to image converter) using Claude 3 Opus, which can seamlessly run the combined code.

Pattern 3: Use Red-Green TDD. This four-word prompt encapsulates the entire test-driven development (TDD) approach: write tests first (fail/red), confirm failure, then implement (pass/green). This is particularly effective for AI because the greatest risk is producing code that “runs but is incorrect” or “is never used.”

Pattern 4: Run Tests First. At the start of each new session, the first command should be: run tests first. This indicates to the AI that the project has tests, and the number of tests suggests the project’s scale, putting the AI in a testing mindset.

Pattern 5: Linear Walkthroughs. Have AI generate structured code explanation documents. Willison spent 40 minutes using Claude Code to vibe code a SwiftUI slideshow app without looking at the code. The app runs, but he learned nothing about SwiftUI. He then had the AI use the Showboat tool to generate walkthrough documentation explaining all .swift files, stating:

I learned a lot about SwiftUI and Swift from this.

In this process, AI not only did not reduce learning but became a learning accelerator.

Pattern 6: Interactive Explanations. When textual explanations are insufficiently clear, ask the AI to generate visualizations. For example, when encountering the word cloud algorithm “Archimedean spiral placement,” he found the documentation unclear. He requested Claude to create an animated demonstration page, making the algorithm’s principles accessible.

Pattern 7: GIF Optimization Cases. Use complete prompt examples to show how to have Claude Code build WebAssembly tools.

Pattern 8: Common Prompt Library.

Cognitive Debt is the Real Issue

Willison introduces a key concept: cognitive debt—code that runs but whose principles you do not understand. This differs from technical debt, which refers to poor code quality that must be repaid later. Cognitive debt means you do not understand it and will need to learn it later.

He used 40 minutes of vibe coding on a SwiftUI app (chat logs); it runs, but he has no understanding of it. If this were in a core business, it poses a significant risk. The core application becomes a black box, making it difficult to reason confidently and plan new features.

So how do you repay this debt? The answer is linear walkthroughs + interactive explanations to enhance understanding.

If you’re worried that LLMs slow down learning, I strongly recommend adopting these patterns.

Divergence on Hacker News

Willison’s guide sparked discussions on Hacker News. Developer mohsen1 shared practical experiences using AI.

Image 7

He summarized four key insights:

  1. Do not micromanage AI; let it explore.
  2. Testing is everything; without validation, the loop can go astray.
  3. Allow AI to experiment freely; failure is also knowledge.
  4. Use .md for inter-session memory; AI lacks cross-session memory, so use Markdown for external memory.

Another faction, the “Dark Factory,” advocates for a more aggressive approach: throw tokens at problems and validate as you go, without needing to write tests first.

Image 8

While these two camps seem opposed, they can actually complement each other—strict TDD for core business and rapid iteration for prototyping. Both agree on one point: validation cannot be skipped.

Willison states that this model will continue to evolve, aiming for 1-2 new chapters each week. In this context, we must ponder: when writing code is no longer expensive, what remains the core value of engineers? It may be three abilities: knowing what to write, knowing what good code looks like, and knowing how to keep AI on track. Willison’s eight patterns fundamentally train the third ability. However, the first two still require deep engineering experience to support them. While code has become cheaper, judgment has become more valuable. This may represent the new value of software engineers in the AI era.

Was this helpful?

Likes and saves are stored in your browser on this device only (local storage) and are not uploaded to our servers.

Comments

Discussion is powered by Giscus (GitHub Discussions). Add repo, repoID, category, and categoryID under [params.comments.giscus] in hugo.toml using the values from the Giscus setup tool.