猫でもわかるWeb開発・プログラミング

本業エンジニアリングマネージャー。副業Webエンジニア。Web開発のヒントや、副業、日常生活のことを書きます。

Vibe Coding とは? - 生成AIを使ったコーディング

最近 Vibe Coding と言う言葉よよく聞くようになりました。Vibe は直訳すると「雰囲気」です。Vibe Coding は直訳すると「なんとなくコーディング」とか「雰囲気コーディング」になります。

この言葉は、AIを専門にしている Andrej Karpathy さんの生み出した言葉のようです。

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. 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.

LLM に面倒な実装をお願いして、常に "Accept All" して、生成された diff も見ない。エラーが出たらエラーメッセージをコピぺして修正させる。コード量はどんどん増えていき、私の理解の範疇を超える。たまに LLM がバグを修正できない場合があるので、その場合だけ自分で回避策を考えるか、ランダムにコードを修正させて直るのを待つ。

最近は単に生成AIを使ってコーディングすることを Vibe Coding と読んでいることもありそうだが、元のポストからすると、生成された diff などもあまり確認せずどんどん Accept していくのが Vibe Coding のようです。まさに「雰囲気だけでコーディングしている」と言うわけです。

僕の経験だと、以下の場面では特に Vibe Coding が役に立つなと感じています。

  • やることは明確だが実装が面倒くさい場合
  • エラーを解決する場合