跳转到内容

Vibe coding

维基百科,自由的百科全书

这是本页的一个历史版本,由Wolfch留言 | 贡献2025年3月26日 (三) 23:51编辑。这可能和当前版本存在着巨大的差异。

ChatGPT撰寫洗牌的Javascript函式

Vibe coding是一種使用AI程式設計技術,開發者會用幾句話描述要處理的問題,將這些文字作為提示,提供給開發軟體專用的大型语言模型(LLM),应用程序的原始碼是由大型语言模型產生,開發者的工作從原來的撰寫程式碼,改為指導AI產生程式碼,測試及優化程式碼[1][2][3]。Vibe coding的提倡者認為這甚至可以讓新手程式設計師在沒有以往软件工程要求技能的情形下,可以產出軟體[4]。此一詞語是由安德烈·卡帕斯在2025年2月提出[5][2][4][1],在3月時列在韋氏英語慣用法詞典英语Merriam-Webster's Dictionary of English Usage的"slang & trending"名詞[6]

定義

電腦科學家安德烈·卡帕斯OpenAI的共同創辦人,也曾任特斯拉的AI部門總監,他在2025年2月提出了vibe coding一詞[5][2][4][1]。此概念是指依賴大型语言模型的程式撰寫方式,程式設計者用自然語言敘述,提供給大型语言模型,以此產生可運行的程式碼[1]。卡帕斯敘述其開發方式是對話式的,用語音命令,由AI產生實際的程式碼[2]「這作法不是直接撰寫程式,我看到了東西,說出來,運行,剪貼,此作法大部份情形下可以運作。」[4]。卡帕斯也承認vibe coding有其限制,AI工具不一定能理解出現的錯誤,也不一定可以修正,為了解決問題,他需要作實驗,進行一些無關的變更,直到問題解決為止[2]。他對此技術的結論是「若應用在throwaway weekend project上,是個不錯的技術」,認為此技術「很有意思」[5]

vibe coding的概念說明了卡帕斯從2023年起的主張「最新最熱門的程式語言是英文」,大型语言模型的能力已可以讓人不需要為了讓電腦運作而學習特定的程式語言[7]

依照vibe coding的定義,其中的重要概念是使用者接受AI產生的程式碼,不需要對其有完全的理解[1]。AI研究者Simon Willison英语Simon Willison提到:「若大型语言模型寫了你程式裡的每一行內容,而你對其進行評審和測試,對此完全理解,這就不是我書裡提到的vibe coding,這只是把大型语言模型當成打字助理。」[1]

使用情形和評論

紐約時報的記者Kevin Roose英语Kevin Roose本身不是專業的程式設計者,他用vibe coding創成了數個小型的應用程式[3]。他認為這些軟體是「針對個人的軟體」,是個人化,由AI產生的工具,可以處理特定的需求,例如一個名為LunchBox Buddy的應用程式,可以分析其冰箱裡的食物,建議可以選哪些食物打包當午餐[3][7]。Roose也提出vibe coding讓非程式設計者可以開發可運作的軟體,但其成果多半是受限的,而且容易有錯誤[3]。其中有一個AI生成的程式在电子商务平台上產生了假的評論[3]。他認為vibe coding比較適合用在個人興趣的專案,不適合用在重要的專案[3]。他也注意到AI協助的程式設計可以讓個人開發一些以往需要一組工程師才能開發的軟體[3]。AI專家Gary Marcus英语Gary Marcus有對此進行回應,他提到生成LunchBox Buddy應用程式的演算法,可能已生成過其他功能類似的應用程式[7]。Marcus認為Roose的熱情是來自重製,而不是原創[7]

2025年2月的《商业内幕》提到,vibe coding已是矽谷的新流行語[4]

已隱藏部分未翻譯内容,歡迎參與翻譯

In March 2025, Y Combinator reported that 25% of startups in its Winter 2025 batch had codebases that were 95% AI-generated, reflecting a shift toward AI-assisted development.[8]

Vibe coding has raised concerns about understanding and accountability. Developers may use AI-generated code without fully comprehending its functionality, leading to undetected bugs, errors, or security vulnerabilities. While this approach may be suitable for prototyping英语Software prototyping or "throwaway weekend projects" as Karpathy originally envisioned, it is considered by some experts to pose risks in professional settings, where a deep understanding of the code is crucial for debugging, maintenance, and security. Ars Technica cites Simon Willison, who stated: "Vibe coding your way to a production codebase is clearly risky. Most of the work we do as software engineers involves evolving existing systems, where the quality and understandability of the underlying code is crucial."[1] In what Ars Technica described as an "ironic twist in the rise of 'vibe coding'", an AI coding assistant refused a programmer's request to generate code and responded with the text, "I cannot generate code for you, as that would be completing your work," and continued, "you should develop the logic yourself."[9]

參考資料

  1. ^ 1.0 1.1 1.2 1.3 1.4 1.5 1.6 Edwards, Benj. Will the future of software development run on vibes?. Ars Technica. 2025-03-05 [2025-03-06]. (原始内容存档于2025-03-06) (美国英语). 
  2. ^ 2.0 2.1 2.2 2.3 2.4 What is 'vibe coding'? Former Tesla AI director Andrej Karpathy defines a new era in AI-driven development. The Times of India. 2025-03-02 [2025-03-03]. (原始内容存档于2025-03-04). 
  3. ^ 3.0 3.1 3.2 3.3 3.4 3.5 3.6 Roose, Kevin. Not a Coder? With A.I., Just Having an Idea Can Be Enough.. The New York Times. 2025-02-27 [2025-03-03]. ISSN 0362-4331. (原始内容存档于March 3, 2025) (美国英语). 
  4. ^ 4.0 4.1 4.2 4.3 4.4 Chowdhury, Hasan; Mann, Jyoti. Silicon Valley's next act: bringing 'vibe coding' to the world. Business Insider. 13 February 2025 [2025-03-03]. (原始内容存档于February 26, 2025). 
  5. ^ 5.0 5.1 5.2 Karpathy, Andrej. Andrej Karpathy on X: "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. ...". X. 2 February 2025 [2025-03-07]. (原始内容存档于February 18, 2025). 
  6. ^ vibe coding. www.merriam-webster.com. March 8, 2025 [2025-03-15] (英语). 
  7. ^ 7.0 7.1 7.2 7.3 Naughton, John. Now you don't even need code to be a programmer. But you do still need expertise. The Observer. 2025-03-16 [2025-03-16]. 
  8. ^ Mehta, Ivan. A quarter of startups in YC's current cohort have codebases that are almost entirely AI-generated. TechCrunch. 2025-03-06 [2025-03-06]. (原始内容存档于March 6, 2025) (美国英语). 
  9. ^ Edwards, Benj. AI coding assistant refuses to write code, tells user to learn programming instead. Ars Technica. 2025-03-13 [2025-03-16]. (原始内容存档于March 16, 2025). 

外部連結