Skip to Content
超越Vibe编程
book

超越Vibe编程

by Addy Osmani
August 2025
Beginner to intermediate
254 pages
3h 1m
Chinese
O'Reilly Media, Inc.
Content preview from 超越Vibe编程

第 1 章. 简介:什么是 Vibe Coding?什么是 Vibe Coding?

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

人工智能正在重塑我们构建软件的方式,为编码引入了从自由形式提示到结构化辅助的新范式。想象一下,在编写软件时,只需描述你希望它做什么--几乎就像与队友交谈一样--人工智能就能将这些想法转化为代码。 这就是"氛围编码 "的精髓。"氛围编码"是一种以提示为先的探索性方法,在这种方法中,你可以用自然语言描述你想要什么,然后让大语言模型(LLM)来填补空白。 最近,人工智能先驱安德烈-卡尔帕斯(Andrej Karpathy)创造了这个词来描述这种新的编程方式,在这种方式中,开发人员 "完全屈服于 "人工智能的帮助。

在本书中,我将深入探讨 vibe 编码对专业开发人员的意义,以及它与我所说的人工智能辅助工程(一种更正式的增强编码过程)之间的比较和互补。 我将探讨在这个人工智能优先的时代,开发人员的角色是如何演变的,哪些工具和工作流程可以最大限度地提高你的效率,以及如何应对让人工智能在你的代码库中自由发挥的独特挑战。我还将探讨振动编码的优势和劣势,以及如何平衡人工智能的生成速度和人类监督的智慧。到最后,你应该能清楚地了解如何在自己的编码实践中负责任地、有效地利用 "氛围",从而在人工智能时代不仅成为一名更快的编码员,而且成为一名更具创造力和影响力的软件产品工程师。

在本章中,我们将探讨开发人员的角色如何从为机器编写详细指令转变为通过表达意图与人工智能合作(见图 1-1)。我们将了解为什么编程中的这种 "氛围转变 "如此重要,它在高层次上是如何运作的,以及它带来了哪些机遇和挑战。

图 1-1. 意图编程的概念图解。开发人员提供高级规格("意图"),然后人工智能将其转化为代码。这凸显了从逐行编写代码到在高层次上指导代码生成的转变。

人工智能编码谱系:从虚拟编码到人工智能辅助工程

在过去的一年中,我观察到开发人员(尤其是中高级网络开发人员)在工作流程中接纳人工智能的方式出现了令人着迷的分化。 一端是振动编码。另一端是我所说的人工智能辅助工程:在明确的约束条件下,将人工智能融入软件开发的每个阶段,从设计到测试。这两种方法都利用了强大的人工智能,但它们的目标、受众和期望却明显不同。在本书中,我将探讨这两个极端,以及它们对现代网络开发的意义。

Vibe-Coding 方法:通过对话编码

在 vibe 编码中,你利用强大的 LLMs 作为编码伙伴,让它们处理代码生成的繁重工作,这样你就可以专注于更高层次的目标。 正如 《商业内幕》(Business Insider)的一篇摘要所说,vibe 编码 "意味着使用人工智能工具......来完成编码中的繁重工作,从而快速构建软件"。正如英伟达公司首席执行官黄仁勋所说,得益于人工智能,"最热门的新编程语言 "是英语,而不是 Java 或 Python。你不再需要手动键入每一个功能和错误修复,而是用自然语言与人工智能进行交互--勾画功能、审核建议,并根据人工智能的输出进行迭代。

这种方法代表了从传统编程到人工智能辅助开发的巨大转变。 传统的编码要求精心策划、语法精确,而且经常需要进行艰苦的调试。而 Vibe 编码则颠覆了这一传统:卡尔帕斯对《 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

深入淺出代數

深入淺出代數

Tracey Pilone, Dan Pilone
低代码AI

低代码AI

Gwendolyn Stripling, Michael Abel
AI工程

AI工程

Chip Huyen

Publisher Resources

ISBN: 9798341667020