清理 AI 开发大牛留下的烂摊子
Cleaning up after AI rockstar developers

原始链接: https://www.codingwithjesse.com/blog/rockstar-developers/

“摇滚明星”式的开发者——他们编写的代码虽然才华横溢,却过于复杂且充满个人怪癖——一旦离职,往往会给团队留下严重的各种技术债和难以维护的烂摊子。如今,生成式人工智能加剧了这一现象,它就像是一支缺乏协作的“摇滚明星”大军。大语言模型(LLM)能迅速生成大量“凭感觉编写”的代码,却往往忽视架构的连贯性、可维护性或系统的长期健康。这形成了一个危险的循环:团队变得极其依赖人工智能,去解读正是由人工智能创造的复杂代码。 为了应对这一挑战,开发者必须从被动的使用者转变为主动的工程师。人类应主导系统设计,将人工智能仅用于小规模、可控的代码片段,而非任由其主导代码库。要将简洁性、可读性和团队一致性置于技巧或速度之上。如果一个系统复杂到必须借助大模型才能理解,那就该慢下来并进行简化了。归根结底,匠心始终是人类的责任;尽管大语言模型可以作为辅助工具,但开发者必须保持对架构的主导权,以确保软件具备可持续性、可理解性,并真正做到健壮稳固。

这篇 Hacker News 讨论帖探讨了清理“垃圾代码”(slop)所面临的挑战——即由经验不足的开发者或快速的 AI“感觉式编程”(vibe coding)所产生的低质量、难以维护的代码。 主要观点包括: * **“AI 摇滚明星”问题:** 讨论者认为,所谓的“十倍速开发者”往往因使用深奥晦涩的工具且忽视文档,从而造成了比其产出价值更多的长期维护债务。AI 进一步加剧了这一问题,让用户能够在不理解底层架构或潜在影响的情况下,大量产出代码。 * **工程化与原型设计:** 许多评论者区分了“原型设计”(AI 表现良好)与“工程化”(需要系统性理解、安全性及长期可维护性)。共识在于:AI 输出的内容对于原型来说往往“勉强够用”,但缺乏人工监督和专家设计时,就会成为一种负担。 * **“柠檬市场”效应:** 讨论强调,利益相关者往往优先考虑短期速度,从而激励了“一次性”代码的产生。然而,资深工程师指出,软件通常需要运行数十年,当前 AI 生成的“抛弃式”代码趋势将为未来的维护团队带来危机。 * **结论:** 虽然 AI 对于有技能的工程师来说是强大的效能倍增器,但当它被用作替代真正的技术能力和设计意图时,只会制造出无法持续的混乱。
相关文章

原文
tangled wires in an audio mixer setup Photo by Martijn Baudoin on Unsplash

We've all worked with a rockstar developer. They joined the team years ago, full of energy. They had great ideas about new tech, new paradigms, new architectures. Their cutting-edge ideas left everyone else feeling a bit behind and outdated.

They rewrote most of the company's core architecture. They introduced new build processes, new tools, new languages. They rejected most pull requests, raising the bar on what was expected of everyone else. Nobody understood the code they wrote but nobody would admit it.

All the hardest tasks were assigned to the rockstar. They'd have it done faster than anyone else. The engineering always sounded very impressive, even if the rockstar was the only one who knew how it fit together.

Everyone else was moving a lot slower in comparison. Everyone was struggling to keep up, to learn the new libraries, and to do things the rockstar way.

A few years after they joined the team, suddenly they were gone. They had gotten bored, and wanted a better job working on a more challenging project at a bigger company.

Dealing with the aftermath

Suddenly, you were asked to take over the rockstar's projects. You dug into the code, and you found yourself buried alive. The flow of data was so hard to follow, it seemed like someone was trying to cover up a murder.

You started with trying to fix a simple bug. Just getting the code to run on your laptop took a week.

Half the code was written in a language you didn't understand. The other half was written using libraries you never heard of.

You tried to tell your boss that you think the code needs a rewrite. They didn't believe you, because it was written by the rockstar himself. As you waded through the slop, you browsed job postings and fantasized about leaving.

Cleaning up after a rockstar

I've worked with many teams and agencies who needed me to clean up after these rockstars. I actually love the challenge of trying to understand and rescue a messy codebase. It's like sitting down with a box of tangled string lights, and pulling it apart until they're usable again.

As I've gone through the process, I've seen some patterns. These rockstars absolutely love coding, learning, and using new paradigms, and it shows. They're always pushing themselves to the edge of their abilities, writing the most clever code they can. They are focused on moving as fast as they can.

Unfortunately, the last thing these rockstars care about is writing code that others can work with.

Along comes artificial intelligence

In the past years, most teams have been overwhelmed by an army of rockstars. Every time someone starts a new chat, there's the risk of adding a rockstar to the team.

The agent doesn't remember anything it did yesterday. It happily generates tens of thousands of lines of code in minutes. It works to complete tasks as fast as unhumanly possible. It doesn't care whether this code will fit with all the other code in the system. It also doesn't care whether the system is becoming more understandable, or worse.

The AI has a toolbox of best practices that probably don't apply here. It insists on the "belt and suspenders" way of doing things, even when the complexity outweighs the benefit. When asked to review your code, it comes up with a long list of improvements, many of which you disagree with. The bar has been raised for everyone, and many feel they need to use LLMs or else they'll fall behind forever. (Though I believe it'll be those who let LLMs write all their code who will ultimately be left behind.)

With so much generated code, the complexity of a system can grow exponentially. It can be so complex that the only way to make sense of it is to use an LLM. Developers, teams, whole companies can become addicted and dependent on generative AI.

Cleaning up after hundreds of AI rockstars

Sitting down with a pile of slop isn't as fun as cleaning up after a rockstar. At least the rockstar had some kind of design in mind, and was trying to do their best.

A vibe coded pile of slop wasn't written by a single artificial developer. It was generated across many different chats, and many different contexts. It's like a codebase written by hundreds of different rockstars, one feature or bugfix at a time.

Sometimes there's so much technical debt that it can never be paid off.

Building software that lasts

There are many ways to use an LLM that don't allow it to act like a rockstar. You can lead the engineering, and guide the LLM to generate small snippets at a time. You can ensure that the software is written in a way that everyone on your team will be able to understand and work with it easily.

If you find yourself lost, unable to understand what the LLM is doing or why, tap the brakes. It's okay to move slower, to ensure the software you're generating is high quality. It's also okay to prevent over-engineering, to simplify and simplify until the architecture matches the complexity of the problem.

It's also okay to leave your LLM in the toolbox sometimes, and to write code yourself. Craftsmanship will always be in our hands, it's one thing we can never outsource to a machine.

Published on June 8th, 2026. © Jesse Skinner

联系我们 contact @ memedata.com