# Vibe coding

> A term coined by Andrej Karpathy on February 3, 2025:

A term coined by <Andrej Karpathy> on February 3, 2025:

> 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](https://wiki.g15e.com/en/pages/Large%20language%20model.txt) (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. I ask for the dumbest things like "decrease the padding on the sidebar by half" because I'm too lazy to find it. I "Accept All" always, I don't read the diffs anymore. When I get error messages I just copy paste them in with no comment, usually that fixes it. The code grows beyond my usual comprehension, I'd have to really read through it for a while. Sometimes the LLMs can't fix a bug so I just work around it or ask for random changes until it goes away. It's not too bad for throwaway weekend projects, but still quite amusing. I'm building a project or webapp, but it's not really coding - I just see stuff, say stuff, run stuff, and copy paste stuff, and it mostly works.[^1]

Vibe Coding != [Agentic coding](https://wiki.g15e.com/en/pages/Agentic%20coding.txt)

## Notes

Something that happened on <March 12, 2025>.

I wasted an enormous amount of time vibe coding with AI. The biggest reason was that the field was relatively unfamiliar to me. Because I didn't know much, I couldn't give AI proper instructions; without proper instructions, AI couldn't produce good results. And because I didn't know much, I couldn't readily recognize that the results were wrong, so things kept going off the rails.

Exchanging a few more messages with AI and modifying the code in this state sends things further off the rails. When a problem arises, AI often adds more code to block it rather than changing the code responsible. The code grows more complex, and AI makes more mistakes.

Even following the vibe coding creed(?) and deleting everything to start over didn't change the fact that I was unfamiliar with the field, so I kept falling into the same swamp. After spending four hours this way, I took a short break, pulled myself together, and changed strategies.

I spent about an hour doing the minimum study needed to grasp the key concepts and terms (with AI's help, of course). Starting again after that, I solved it cleanly in about 30 minutes.

- **Lesson 1**. A major problem was that this was ML code, so each run took about 10 minutes. A 10-minute trial-and-error feedback loop is far too long. I should first have shortened it to under 30 seconds by sampling a smaller dataset, temporarily reducing n_epoch, and so on.
- **Lesson 2**. Even when vibe coding, the human giving instructions needs a minimum of knowledge. A moment of reflection ㅜㅜ How can I notice "I know too little about this field" sooner? Something to think about.

Added on <March 14, 2025>. On further thought, the conclusion above is too timid. Asking for something unfamiliar, fumbling through the process, and producing no result is indeed a "failure," but some failures are relatively valuable. Two things matter: how quickly you failed, and how much you learned along the way. I'd like to think further from this perspective.

## See also

- [New practices for AI-aided programming](https://wiki.g15e.com/en/pages/New%20practices%20for%20AI-aided%20programming.txt)
- [Generative AI and programmers' competence](https://wiki.g15e.com/en/pages/Generative%20AI%20and%20competency%20of%20programmers.txt)
- [Agentic coding](https://wiki.g15e.com/en/pages/Agentic%20coding.txt)

## Articles

- 2025-05-26 - [Vibe Coding vs. Agentic Coding: Fundamentals and Practical Implications of Agentic AI](https://wiki.g15e.com/pages/Vibe%20Coding%20vs.%20Agentic%20Coding%20-%20Fundamentals%20and%20Practical%20Implications%20of%20Agentic%20AI.txt)
- 2025-03-19 - [Not all AI-assisted programming is vibe coding (but vibe coding rocks)](https://simonwillison.net/2025/Mar/19/vibe-coding/#atom-everything)
- 2025-03-18 - [People of ACM - Tim Menzies](https://www.acm.org/articles/people-of-acm/2025/tim-menzies)
	- I'm predicting a software engineering gold rush where more and more human engineers will have to be hired to clean up the train wrecks left behind by the next few years of vibe programming (vibe programming: driven by large language models (LLMs) with hints from humans, where no one reads or checks the hastily generated code).

## Footnotes

[^1]: https://x.com/karpathy/status/1886192184808149383