技术随笔-202502-AI生成代码的当下与未来

104 阅读4分钟

要点

2025年3月6日,在TechCrunch网站上出现了一片文章,聊到了AI生成代码的比例在YC(一个创业加速器)孵化的企业的代码产品中,已经超过95%。

这听起来非常吓人。

我简单说下我自己看到的的内容,感兴趣的可以阅读原文,顺便练习一下英语阅读。

第一, AI写代码很适合一个产品的起步。
第二, AI写的代码现在质量还有待提升,随着用户数量的增加,随着逻辑的复杂度提升,需要不断的优化和重构,因此要学会读AI的代码,不要无脑 Vibe Coding。
第三,使用AI编程的人并不是不懂代码的人,反而是经过代码训练很久的专业人士。他们利用AI来增强自己编程的能力罢了。

什么是Vibe Coding?
轻松愉快的编程,凭借直觉和感觉。
这样,可以跳过很多编程无聊和枯燥的部分。
在会编程的LLM出现之后,这个Vibe Coding越来越流行,正式被 Andrej Karpathy 提出,并且成为一个流行的词汇。

我也用AI编程工具Cursor写过2个安卓App,3个Chrome Extension,我觉得非常好用,但是也仅限于创意实现。

我工作中也会用Cursor,但是我认为工作中使用LLM工具编程带来的最大的问题在于:

1. 安全问题。如果代码中有Token等东西被上传上去了,会比较危险!!!
2. Cursor等工具难以真正正确的理解多个代码文件和复杂的大型工程。

我在工作中怎么使用Cursor呢?

  1. 我会不断的跟Cursor聊我的一个函数级别的思路,我让它帮我实现小的局部的代码,不会让它帮我直接写一个功能,因为复杂的工程代码量很大,AI是没有真正理解的大的构思和架构,但是它可以帮助实现小的代码块,正确率还是蛮高。
  2. 我让它帮我读一段已有的代码。
  3. 我在接受代码的时候会尽量每一行都读,我不会大块不读就直接接受,那个太危险了。

原文

A quarter of startups in YC's current cohort have codebases that are almost entirely AI-generated | TechCrunch

With the release of new AI models that are better at coding, developers are increasingly using AI to generate code. One of the newest examples is the current batch coming out of Y Combinator, the storied Silicon Valley startup accelerator. A quarter of the W25 startup batch have 95% of their codebases generated by AI, YC managing partner Jared Friedman said during a conversation posted on YouTube.

Friedman said that this 95% figure didn’t include things like code written to import libraries but took into consideration the code typed by humans as compared to AI.

“It’s not like we funded a bunch of non-technical founders. Every one of these people is highly technical, completely capable of building their own products from scratch. A year ago, they would have built their product from scratch — but now 95% of it is built by an AI,” he said.

In a video titled “Vibe Coding Is the Future,” Friedman, along with YC CEO Garry Tan, managing partner Harj Taggar, and general partner Diana Hu, discussed the trend of using natural language and instincts to create code.

Last month, former head of AI at Tesla and ex-researcher at OpenAI, Andrej Karpathy used the term “vibe coding” to describe a way to code using large language models (LLMs) without focusing on code itself.

Code generated from AI is far from perfect, though. Studies and reports have observed that some AI-generated code can insert security flaws in applicationscause outages, or make mistakes, forcing devs to change the code or debug heavily.

During the discussion, Hu said that even if product builders rely heavily on AI, one skill they would have to be good at is reading the code and finding bugs.

“You have to have the taste and enough training to know that an LLM is spitting bad stuff or good stuff. In order to do good ‘vibe coding,’ you still need to have taste and knowledge to judge good versus bad,” she said.

Tan also agreed on the point of founders needing classical coding training to sustain products in the long run.

“Let’s say a startup with 95% AI-generated code goes out [in the market], and a year or two out, they have 100 million users on that product. Does it fall over or not? The first versions of reasoning models are not good at debugging. So you have to go in-depth of what’s happening with the product,” he suggested.

VCs and developers have been excited about AI-powered coding. Startups including Bolt.newCodeiumCursorLovable, and Magic have raised hundreds of millions of dollars in funding in the last 12 months.

“This isn’t a fad. This isn’t going away. This is the dominant way to code. And if you are not doing it, you might just be left behind,” Tan added.

Topics

AI   code   developer tools    Y Combinator