译:初级开发者之死
原文: https://sourcegraph.com/blog/the-death-of-the-junior-developer
作者: Steve Yegge
譯者: Gemini 2.5 Pro
Warning: This blog post is somewhat speculative; the sky might not be falling. But my spidey-sense is definitely tingling. The way we are all doing our jobs in software is changing, potentially in big ways. So let’s think of this as a thought exercise.
警告:这篇文章有点推测的成分;天可能还没塌下来。但我的“蜘蛛感应”确实在作响。我们所有人在软件行业的工作方式正在改变,可能是巨变。所以,咱们就把这当成一次思想实验吧。
With that disclaimer, we’re off!
有了这个免责声明,我们开始吧!
I have been chatting with a bunch of both junior and senior developer-type folk at different companies lately. By cross-barfticulating these conversations I’ve picked up on an emerging new pattern, which is that like 80% of you are way smarter than me. My goodness. What have I been doing?
最近,我一直在和不同公司的一些初级和资深程序员聊天。通过交叉“反刍”这些谈话,我发现了一个正在浮现的新模式,那就是你们中大概 80% 的人都比我聪明得多。我的天,我这些年都在干嘛?
But also another pattern, which is that a lot of people picked a bad year to be a junior developer. A whole lot of people. I wouldn’t want to be just getting started in the industry today.
但也发现了另一个模式:很多人,是很多人,都在一个不好的年份成了一名初级程序员。我可不想在今天才刚刚踏入这个行业。
Not just the computer industry. Any industry. It’s a bad year to be a junior anything.
不只是计算机行业。任何行业都一样。今年对于任何领域的“初级”人员来说,都是糟糕的一年。
My wife Linh and I are huge horror-movie buffs. So, to reflect the somber theme of today’s rant, I will use horror movie titles to introduce our sections.
我和我的妻子 Linh 是超级恐怖片迷。所以,为了呼应今天这篇“咆哮”的阴郁主题,我会用恐怖电影的片名来作为每个章节的标题。
Let’s start by talking about what’s happening to junior developers.
让我们从初级程序员正在经历什么开始说起。
国定杀戮日 (2013)
Our first story of the day is about a law firm and has nothing to do with programming. But it is indeed centrally relevant to the crisis that is just starting to loom ominously, as crises love to do. My buddy Gene Kim gave me permission to share this story about his friend who is a managing partner at a 50-person law firm.
我们今天第一个故事,是关于一家律师事务所的,和编程没什么关系。但它确实与一场正不祥地逼近的危机息息相关——危机总是喜欢这样悄然而至。我的朋友 Gene Kim 允许我分享这个故事,是关于他的一位朋友,一个 50 人律所的管理合伙人。
In short, one might surmise that all hell is breaking loose at said law firm because of ChatGPT, with some wondering whether the entire structure of their firm, which has been stable for a very long time, might now be completely wrong. Their whole comp structure, pensions, succession planning, everything is going through an existential crisis due to a frigging chatbot.
简而言之,你可能会猜到,由于 ChatGPT,这家律所简直是天下大乱,有些人开始怀疑,他们公司沿用已久的稳定结构,现在是不是已经完全过时了。他们整个薪酬结构、养老金、继任计划,所有的一切,都因为一个该死的聊天机器人而陷入了一场生存危机。
The problem, you see, is that there could be a future where they don’t need junior associates anymore.
你看,问题在于,未来他们可能再也不需要初级助理了。
Increasingly, they need only senior associates, who (a) describe the tasks to be done; i.e., create the prompts, and (b) review the resulting work for accuracy and correctness. The high-end LLMs do so well with tasks normally fielded by junior associate lawyers, that there isn’t much room left for the real junior associates on payroll.
他们越来越只需要资深助理,他们负责 (a) 描述要完成的任务,也就是创建 prompt;(b) 审查结果的准确性和正确性。高端的 LLM 在处理通常由初级助理律师负责的任务时表现得太好了,以至于薪酬表上已经没有多少空间留给真正的初级助理了。
The LLM can produce research, summaries, briefs, contracts, memos, pleadings, petitions - anything they need. All the documents it creates are “perfect”…with the catch that if someone senior doesn’t double check its work before a judge sees it you might wind up in jail or something.
LLM 可以产出研究报告、摘要、案情简介、合同、备忘录、诉状、请愿书——任何他们需要的东西。它创建的所有文档都“完美无瑕”……但有个前提,那就是如果资深人士不在法官看到之前仔细检查一遍,你可能会锒铛入狱。
Catching the LLM in a hallucination, catching a junior associate in a mistake - pretty similar. Really just two options for generating the same output. Except one of those options is fast and tireless and essentially free. And the other one puked on the chocolate fountain at the holiday party.
抓住 LLM 的一次幻觉,和抓住一个初级助理犯的错——非常相似。说到底,只是生成同样产出的两种选择。只不过其中一个选项速度快、不知疲倦,而且基本免费。而另一个,曾在公司派对上吐在了巧克力喷泉里。
Whew. You picked a bad year to be a junior associate lawyer, that’s for damn sure.
呼。如果你是初级助理律师,那你真是选错了年份,这一点毋庸置疑。
闪灵 (1980)
Gene shared the law-firm story to illustrate how widespread this problem is. He suggests that the same chaos, which is undoubtedly unfolding across legal firms everywhere, could affect all writing and editorial jobs. You can imagine a world where demand for junior writers and editors starts to evaporate.
Gene 分享这个律所的故事是为了说明这个问题有多普遍。他认为,这场无疑正在所有律所上演的混乱,也可能影响到所有的写作和编辑工作。你可以想象一个世界,对初级作者和编辑的需求开始蒸发。
Market forces are nudging everyone towards having senior writers who are also good prompt engineers: An arrangement that meets all of their needs faster and cheaper than hiring junior humans.
市场力量正在推动每个人都去拥有既是资深作者又是优秀 prompt 工程师的员工:这种安排比雇佣初级人类能更快、更便宜地满足所有需求。
Gene, as an accomplished and senior author, is delighted with his productivity gains with his LLM of choice, Claude Opus. He showed me a big writing project that he’d just finished, in which he had spent easily 45+ minutes crafting the prompt, refining it until he had a 7500-word narrative that could serve as a starting point for rewriting, editing, and adjustment. Claude generated that 7500-word draft from his prompt. (In comparison, this blog post is about half that size.) And that draft was fantastic. I’ve read it and it’s glorious.
Gene 是一位卓有成就的资深作家,他对使用自己选择的 LLM——Claude Opus——所带来的生产力提升感到非常高兴。他给我看了一个他刚完成的大型写作项目,他花了足足 45 分钟以上来精心设计 prompt,不断完善,直到他得到一个 7500 字的叙事草稿,可以作为重写、编辑和调整的起点。Claude 根据他的 prompt 生成了那份 7500 字的草稿。(相比之下,这篇博客文章的长度大约是它的一半。)那份草稿棒极了。我读过,写得非常精彩。
On a good day, Gene can write 1,000 words per day. His estimate is that Claude did for him in 90 minutes what would normally have taken him ten days. It solves the “blank-page problem” and gets him to the 20-yard line, where the fun begins.
在状态好的一天,Gene 每天能写 1000 个字。他估计,Claude 在 90 分钟内为他完成的工作,通常需要他花十天时间。它解决了“白纸难题”,把他带到了 20 码线,真正有趣的部分从那里才开始。
He estimates using an LLM as a writing tool gets him there 2-3x faster now, helping him meet his personal requirements and quality bar.
他估计,使用 LLM 作为写作工具,现在能让他快 2-3 倍,帮助他达到个人要求和质量标准。
Gene could not be happier, at least for himself, because in addition to being faster, he also feels working this way is more fun. All work and no play makes Jack a dull boy, right? He’s a happy dude.
至少对他自己而言,Gene 再高兴不过了,因为除了更快,他还觉得这样工作更有趣。光工作不玩耍,聪明孩子也变傻,对吧?他现在是个快乐的家伙。
But he is terrified for his teenage kids.
但他为自己十几岁的孩子们感到恐惧。
天外魔花 (1956)
Anecdote: I watched the pod scene from the original black and white 50s version of this movie when I was about 8, and wow, that was traumatizingly scary. My wife has also been watching horror movies since she was about 4 (!) and we share a deep love of horror, probably because we’re all messed up from childhood.
轶事:我大概 8 岁的时候看过 50 年代原版黑白电影里的豆荚场景,哇,那真是吓得我留下了心理阴影。我妻子也是从 4 岁(!)就开始看恐怖片,我们都对恐怖片有着深沉的热爱,可能因为我们从小就都有点不正常吧。
We’ve just seen the same plot play out for the legal profession and writing/editing jobs, where LLMs are threatening to out-people the people. Let’s watch the same movie again in some genres closer to home.
我们刚刚看到了同样的情节在法律界和写作/编辑行业上演,LLM 正在威胁要取代人类。现在,让我们在离我们更近的领域里,再看一遍这部电影。
Just a few days ago our illustrious Head of AI, Rishabh Mehrotra, was showing me a classifier and multi-class prediction model that he had trained and deployed in a single day with ChatGPT. He said it would have been a 6-week University senior-level intern project a year ago. This is affecting data science too.
就在几天前,我们杰出的 AI 负责人 Rishabh Mehrotra 向我展示了一个分类器和多类别预测模型,他用 ChatGPT 只花了一天就完成了训练和部署。他说,一年前,这会是一个大学高年级实习生需要花 6 周才能完成的项目。这也正在影响着数据科学领域。
An old friend, great programmer and mathematician, who left AI for quantum computing for a few years, is back to programming. He confided - somewhat excitedly - that even though he does a lot of programming, he doesn’t consider himself a programmer anymore.
一位老朋友,一个很棒的程序员和数学家,他曾离开 AI 投身量子计算好几年,现在又回来编程了。他有点兴奋地向我吐露心声,虽然他写很多代码,但他不再认为自己是一名程序员了。
He said he’s more of a reviewer, or coach, or nanny, something like that. He makes ChatGPT do all the work and he just crafts prompts and reviews the output.
他说他更像一个审查者、教练或者保姆,诸如此类的角色。他让 ChatGPT 做所有工作,自己只负责精心设计 prompt 和审查输出。
That resonated with me, since I, too, have been replaced by a bubble-bath plant pod body snatcher who pretends to be a programmer, but is in fact outsourcing almost all of it.
这让我深有同感,因为我自己也已经被一个泡泡浴植物豆荚里的“天外魔物”取代了。它伪装成一个程序员,但实际上几乎把所有工作都外包了出去。
Naturally, when I say “make ChatGPT do all the work”, there is plenty of coding we still do by hand. What I mean is that chat-first is the default, and writing by hand (with completions, naturally!) is our fallback plan. My quantum friend and I are both finding much less need for that fallback recently.
当然,当我说“让 ChatGPT 做所有工作”时,我们仍然有很多代码是亲手写的。我的意思是,优先使用聊天是默认选项,而自己动手写(当然,有自动补全!)是我们的备用计划。最近,我和我那位研究量子的朋友都发现,越来越不需要那个备用计划了。
Since then I’ve found several other super amazing colleagues who have also adopted this coding strategy to accelerate themselves. And frankly it has been a bit of a relief to hear confirmation coming from so many great people that chat-first programming is indeed a New Thing.
从那以后,我发现还有好几位非常厉害的同事也采纳了这种编程策略来提升自己的速度。坦白说,能从这么多优秀的人口中得到确认,知道“聊天优先”的编程确实是一件新事物,这让我松了一口气。
怪形 (1982)
Is it really new? Clearly this “New Thing” has already been around in other domains, since even the original ChatGPT was able to replace a lot of human labor.
这真的新吗?显然,这个“新事物”在其他领域已经存在了一段时间,因为即便是最初的 ChatGPT 也能取代大量的人力。
But for coding, let’s be serious here, chat coding has sucked. It would often be more effort to coax the LLM into a working solution than to write it yourself.
但说到编程,咱们严肃点,聊天式编程一直很烂。想哄着 LLM 给出一个能用的方案,花的力气往往比自己写还大。
With the previous model generations, if you feed in an 800-line source code file and ask for substantial changes, even GPT4-Turbo (which many of you are using right now) will often run amok: Well-argued hallucinations, code that fails to parse, snarky “code left as an exercise” empty functions, designs leading you in circles going nowhere, unexpected refactorings, missing code, and all manner of other frustration.
在之前的几代模型里,如果你喂给它一个 800 行的源代码文件,要求做大量修改,即便是 GPT-4 Turbo(你们很多人现在正在用的就是这个)也常常会失控:给出论证充分的幻觉、无法解析的代码、轻蔑地留下一句“代码作为练习”的空函数、把你绕进死胡同的设计、意想不到的重构、丢失的代码,以及各种其他令人沮ر丧的情况。
You’ve probably tried it yourself. You know what I mean.
你可能自己也试过。你懂我的意思。
So chat programming has been sort of a bust. Nowadays most people equate AI coding assistants with code autocompletions. They think of chat as something you use when you’re just starting out, maybe as a faster docs search.
所以聊天式编程一直以来都有点失败。如今,大多数人把 AI 编程助手等同于代码自动补全。他们认为聊天这东西是给新手用的,或许可以当成一个更快的文档搜索工具。
In fact, there is a widespread perception that chat is for junior developers, and becomes less useful as you gain experience.
事实上,有一个普遍的看法是,聊天是给初级程序员用的,随着经验的增长,它的用处会越来越小。
And truth be told, this wasn’t entirely inaccurate prior to mid-May. The models weren’t quite there yet.
说实话,在五月中旬之前,这个看法并非完全不准确。那时的模型确实还不够好。
But for the past six weeks, things have been very, very different, and YOU my friend are missing out. That perception that chat is for juniors is now a flat-out misconception, one that I pray is stone dead in your heart by the end of this post.
但在过去的六个星期里,情况已经变得非常、非常不同了,而你,我的朋友,正在错过这一切。那种认为聊天是给初级程序员用的看法,现在已经是一个彻头彻尾的误解,我祈祷读完这篇文章后,这个想法能在你心中彻底死去。
机器人杀人狂 (1986)
Chat-based programming, which I will preemptively label Chat Oriented Programming (CHOP) or just “chop”, because I suspect I’ll be saying it a lot, is a brand-spanking new phenomenon. Like, seriously, just over a month old. I first noticed it when GPT-4o came out, which was mid-May.
基于聊天的编程,我姑且先给它起个名字叫面向聊天的编程(Chat Oriented Programming,简称 CHOP)或者就叫“chop”,因为我估计以后会经常提到它。这是一个崭新的现象。我是说真的,也就一个多月。我第一次注意到它是在 GPT-4o 发布的时候,也就是五月中旬。
You remember that big manufactured drama, right, about the new OpenAI “4o” GPT model supposedly having Scarlett Johansson’s voice? That’s the one.
你还记得那场被炒作的大戏吧,就是关于 OpenAI 的新“4o” GPT 模型据称使用了斯嘉丽·约翰逊的声音?就是那个。
That model changed everything about programming overnight.
那个模型一夜之间改变了关于编程的一切。
When GPT-4o dropped, it could suddenly edit 1000-line source files-a figure that encompasses 95+% of the source files in most repos worldwide-with tremendous precision and faithfulness to the original, leaving the untouched parts of the file 99.9% diff-perfect. Every once in a very rare while I see it drop a space character, or slightly mis-indent a line. But that’s it.
当 GPT-4o 发布时,它突然能够编辑 1000 行的源文件——这个数字涵盖了全球大多数代码仓库中 95% 以上的源文件——并且具有极高的精确度和对原始文件的忠实度,未改动部分的代码差异对比能达到 99.9% 的完美。极其偶尔,我才会看到它漏掉一个空格,或者把某一行缩进错了一点点。但仅此而已。
From what I’ve seen, Google’s Gemini and Anthropic’s Claude 3 Opus have also cleared this hurdle. Which makes multi-model prompting a good bulwark against hallucinations, and a great way to select the best candidate for a design. Just feed your query to all of them and make 'em fight it out. It’s a common CHOP technique.
据我所见,Google 的 Gemini 和 Anthropic 的 Claude 3 Opus 也已经越过了这个门槛。这使得多模型 prompting 成为对抗幻觉的坚实壁垒,也是为某个设计挑选最佳候选方案的好方法。只需把你的问题喂给所有模型,让它们一决高下。这是一种常见的 CHOP 技术。
Briefly, CHOP is coding via iterative prompt refinement. Everyone’s attempts to get it to do anything complex used to peter out after 4 to 5 iterations, and the models couldn’t make progress. But now your iterations usually converge, which means you’re reviewing and ultimately approving more and more LLM code, and writing less and less yourself.
简而言之,CHOP 是通过迭代优化 prompt 来进行编程。过去,每个人试图让它做任何复杂事情的尝试,通常在 4 到 5 次迭代后就后继无力,模型无法再取得进展。但现在,你的迭代通常会收敛,这意味着你审查并最终批准的 LLM 代码越来越多,而自己写的代码越来越少。
So programming has leveled up into a problem of explaining your situation to the LLM - that is, slinging context, since you’ll want to include a lot of information from different sources - and then merging the output back into your code base.
所以编程已经升级成了一个新问题:如何向 LLM 解释你的处境——也就是,提供上下文,因为你需要包含来自不同来源的大量信息——然后将输出合并回你的代码库。
We’d better get a tool for this. Chop chop!
我们最好为此准备一个工具。快点,快点!(Chop chop!)
升级 (2018)
The big model upgrade was life-changing for people who have already been coding in raw ChatGPT, which is still the world’s most-used and most popular AI coding assistant. ChatGPT coders have been using chop style for a year or more, but it has been only for the bravest, most patient, and dumbest of early adopters. Whereas now it’s ready for everyone!
这次大模型的升级,对于那些已经在使用原生 ChatGPT 编程的人来说,是改变人生的。原生 ChatGPT 至今仍是世界上使用最广泛、最受欢迎的 AI 编程助手。使用 ChatGPT 的程序员已经用 chop 风格编程一年多了,但这只适合最勇敢、最有耐心、也最“傻”的早期采用者。而现在,它已经为每个人准备好了!
Of course, raw chat involves a lot of manual assembly of context in and shoveling responses out, and it can get tedious, so many programmers use coding assistants instead. (I mean, I guess business is good if you are the CTRL, C, or V keys on a keyboard. Or ⌘ if you are into that sort of thing.)
当然,原生聊天需要大量手动组装上下文,再把回复“铲”出来,这会很乏味,所以很多程序员转而使用编程助手。(我的意思是,如果你是键盘上的 CTRL、C 或 V 键,生意应该不错。或者如果你喜欢,也可以是 ⌘。)
All AI coding assistants benefit from this upgrade, too. It has certainly been huge for our coding assistant Cody, which in my opinion has the best chat due to our automated context assembly engine, which saves you from having to explain your code base every time. Plus Cody Pro lets you use both GPT-4o and Claude (and others), so you can spot-check all your work with another LLM.
所有的 AI 编程助手也都从这次升级中受益。这对我们的编程助手 Cody 来说无疑是巨大的利好。在我看来,Cody 拥有最好的聊天体验,这得益于我们的自动化上下文组装引擎,让你不必每次都解释你的代码库。此外,Cody Pro 让你能同时使用 GPT-4o 和 Claude(以及其他模型),所以你可以用另一个 LLM 来抽查你的所有工作。
The model upgrade is arguably even more effective with our inline edits feature, which handles dropping the response directly into your code. No more shoveling code out of the chat window. Cody just changes your code in place, undoably and retryably. The models are getting smarter, but the integration with your workflow is getting tighter as well.
这次模型升级在我们“行内编辑”功能上的效果可以说更明显,这个功能可以直接将模型的响应插入到你的代码中。再也不用从聊天窗口里“铲”代码了。Cody 直接在原地修改你的代码,支持撤销和重试。模型变得越来越聪明,但它们与你工作流的整合也变得越来越紧密。
What’s happening is a big deal. Programming this way is arguably on its way to being an order of magnitude speedup from completions-based programming. A 10x improvement might sound like an exaggeration. But we just saw examples from legal practice, publishing, and data science in the same ballpark, with 5-30x speedups for certain kinds of tasks, and estimates of at least 2-3x overall boost to productivity.
正在发生的事情非同小可。可以说,这种编程方式正朝着比基于自动补全的编程快一个数量级的方向发展。10 倍的提升听起来可能有些夸张。但我们刚刚看到了法律实践、出版和数据科学领域的例子,都在同一个量级上,某些任务的速度提升了 5-30 倍,对整体生产力的提升估计至少有 2-3 倍。
You can quibble over the numbers, but it’s clear that programmers using CHOP with these new models are getting a turbo boost.
你可以在数字上吹毛求疵,但很明显,使用这些新模型并采用 CHOP 方式的程序员,正在获得涡轮增压般的提速。
Why aren’t you upgraded yet?
你为什么还没有升级?
绞肉机 (1995)
Trivia: My brother told me that movie was so scary that he had to leave the theater. Never saw it myself, but the short story was fun.
花絮:我哥哥告诉我那部电影太吓人了,他不得不中途离场。我自己没看过,但那篇短篇故事很有趣。
We’re going to do story #5 now, the very last story, and it’s mine, and it’s about programming, and the plot is different from the others.
我们现在要讲第五个故事,最后一个故事,是我的故事,关于编程,情节也和前面几个不同。
This is where we learn the hard way why chat programming is for senior devs. Please keep your hands and limbs inside the carriage during the ride.
在这里,我们将通过惨痛的教训来理解,为什么聊天式编程是给资深开发者准备的。在旅程中,请把手和四肢都放在车厢内。
The other day GPT-4o shocked me with one of its coding proposals, while I was chopping away with it at a project. It was such a shock that I laughed for minutes, practically unhinged. I am not often shocked, least of all by looking at the code for a working program.
前几天,当我和 GPT-4o 一起“chop”一个项目时,它的一个代码提议让我震惊了。那种震惊让我笑了好几分钟,几乎失态。我不是一个容易被震惊的人,尤其不会因为看一段能跑的程序的代码而被震惊。
I had presented a small design problem to GPT, asking for an evaluation of my options. It’s great for that. Chat-oriented programming (CHOP) isn’t just about coding. There are a lot of design discussions too. You do everything, even writing sometimes, with the LLM as a pair partner.
我向 GPT 提出了一个小小的设计问题,请它评估我的几个选项。它很擅长做这个。面向聊天的编程(CHOP)不只是写代码,也包含大量的设计讨论。你做所有事情,有时甚至写作,都把 LLM 当成你的结对伙伴。
For some reason, this time ChatGPT launched full-bore into redesigning an entire subsystem of the framework I was stuck in, which had an issue I was trying to work around. I’m sure you have seen this wack behavior from LLMs before. The difference is, now they are very good at rewriting things, and sometimes they’ll swing for the fences, consequences schmonsequences.
不知为何,这次 ChatGPT 全力以赴地开始重新设计我当时陷入困境的那个框架的整个子系统,我只是想绕过其中的一个问题而已。我敢肯定你以前也见过 LLM 这种古怪的行为。不同的是,现在它们重写东西非常在行,有时它们会不管三七二十一,直接“挥棒猛击”。
GPT-4o breezed quickly past most of the sane options before plowing straight into “let’s rewrite it all” scorched-earth mode, clearly not having read Joel Spolsky. It spewed out an unusually long answer, hundreds of lines of code and instructions, presenting thorough and persuasive reasoning supporting this approach.
GPT-4o 迅速略过了大多数理智的选项,然后直接进入了“我们把所有东西都重写一遍”的焦土模式,显然没读过 Joel Spolsky 的文章。它吐出了一个异常长的答案,包含几百行代码和指令,并为这种方法提供了详尽且有说服力的理由。
And the rewrite would have worked! It was a very direct solution to my problem. So it wasn’t “wrong” per se. There are rarely things in design that are truly wrong - like, wrong wrong - as there are exceptions to most rules.
而且这个重写方案是能行的!它非常直接地解决了我的问题。所以它本身并不能算“错”。在设计中,很少有事情是真正错误的——那种绝对的错——因为大多数规则都有例外。
There was only one teeny tiny issue with it, which is that it would have killed someone.
它只有一个微不足道的小问题,那就是它可能会害死人。
Not on my project, hopefully! But if the model is currently spitting out similar suggestions to people working on software that controls giant saws in machine shops, someone’s gonna die.
希望不是在我的项目上!但如果这个模型现在正向那些开发控制机械车间巨型电锯软件的人吐出类似的建议,那肯定会有人要死的。
林中小屋 (2011)
GPT’s redesign was awful - but not when you looked directly at it. Up close it was downright cozy.
GPT 的重构设计糟透了——但如果你只看表面,是看不出来的。近看,它甚至相当舒适。
You had to pull back and look at the design in the broader context of its interactions with other subsystems, but also support, maintenance, upgrades, add-ons, and a bunch of other dimensions that are critically important to software design and engineering. With that wider lens, it was an Unbreakable-level train wreck waiting to happen.
你必须退后一步,在更广阔的背景下审视这个设计,考虑它与其他子系统的交互,以及支持、维护、升级、插件等一系列对软件设计和工程至关重要的维度。从这个更广的视角看,这是一场《不死劫》级别的、一触即发的火车事故。
But it was wearing a superb disguise. A less experienced dev would surely have fallen for it. I could feel the power and the attraction of the approach it was espousing, the force of the arguments backing it. The whole thing was appealingly packaged, technically correct, and laid out for you to just take it and run! (My pal Chris Smith says the word I’m looking for is “specious”. So yeah, that.)
但它伪装得极好。一个经验不足的开发者肯定会中招。我能感受到它所倡导的方法的力量和吸引力,以及支持它的论据的说服力。整个方案包装得极具吸引力,技术上正确,就摆在你面前让你拿去用!(我的朋友 Chris Smith 说我正在找的词是“specious”(似是而非)。没错,就是这个。)
And it just hit me all at once how hilariously inappropriate and potentially dangerous this answer was. It was so impressive and so spooky. I laughed and laughed, like a little kid watching bubble bath plant monsters replacing all the people.
我一下子就意识到这个答案是多么荒唐不经,又具有潜在的危险。它太令人印象深刻了,也太诡异了。我笑了又笑,就像一个小孩看着泡泡浴植物怪兽取代所有人类一样。
My senior colleagues have recently recounted similar chat scenarios in which a more junior dev would have been completely taken in, potentially losing days to weeks of work going the wrong direction.
我的一些资深同事最近也讲了类似的聊天场景,在那些场景里,一个更初级的开发者会完全被蒙蔽,可能会浪费数天到数周的时间走在错误的方向上。
Or worse.
或者更糟。
Chat, it seems, is safer for senior programmers than it is for junior ones. And a lot of companies are going to interpret “safer” to mean “better.”
看来,聊天对资深程序员比对初级程序员更安全。而很多公司会把“更安全”解读为“更好”。
Buckle up. Topsy-turvy times ahead.
系好安全带。前方将是颠倒混乱的时代。
末日逼近 (2020)
A lot of companies ask me, how can we tell which parts were written by the AI and which parts by the programmer? Well, if chat-oriented programming becomes the dominant modality for programmers, then LLMs will be writing the vast majority of all source code worldwide. That’s a gargantuan shift, and it might even shake up the traditional software engineering roles.
很多公司问我,我们怎么能分辨哪些部分是 AI 写的,哪些部分是程序员写的?嗯,如果面向聊天的编程成为程序员的主流模式,那么 LLM 将会编写全球绝大多数的源代码。这是一个巨大的转变,甚至可能会颠覆传统的软件工程角色。
We’ve seen how this shift affected a law firm, a publisher, and engineering’s sibling discipline of data science. Stock in junior contributors is down, and there is concern there could be a market crash.
我们已经看到这种转变如何影响了一家律所、一家出版社,以及工程学的兄弟学科——数据科学。初级贡献者的“股票”正在下跌,人们担心可能会出现市场崩盘。
That presents a very serious problem for new people in those fields. What do you do? How do you learn the ropes, not to mention find gainful employment? What are the ropes now? And what do the companies do when their senior people retire?
这对那些领域的新人来说,是一个非常严重的问题。你该怎么办?你如何掌握要领,更不用说找到一份有收入的工作了?现在的“要领”又是什么?当公司的资深员工退休时,公司又该怎么办?
They could wind up like the COBOL world which is in a worldwide crunch, because there are no junior COBOL devs to replace the ones who retired. Ironically, these huge legacy companies will likely be rooting hardest for the LLMs to write all their code.
他们最终可能会像 COBOL 的世界一样,陷入全球性的困境,因为没有初级的 COBOL 开发者来接替退休的人。讽刺的是,这些拥有庞大遗留系统的公司,很可能将是最希望 LLM 能帮他们写所有代码的。
Things are changing fast. I’m an optimist, and I generally think, or at least hope, that as companies become more productive in the coming months and years, they simply get correspondingly more ambitious.
事情变化得很快。我是一个乐观主义者,我通常认为,或者至少希望,随着公司在未来数月和数年里生产力变得更高,它们也会变得相应地更有雄心。
Everyone will need to get a lot more serious about testing and reviewing code. Senior devs could become full-time reviewers and junior devs shepherd the LLMs, maybe?
每个人都需要更严肃地对待测试和代码审查。也许资深开发者会成为全职的审查者,而初级开发者则负责引导 LLM?
It doesn’t necessarily have to end with a post-apocalyptic wasteland for recent CS grads.
对于新近的计算机科学毕业生来说,结局不一定非得是世界末日般的荒原。
28天后 (2002)
I wrote this post a week ago and have been thinking hard about whether I believe the premise, which is that within a few years, the norm for source code will be that it is written and modified by LLMs via prompting. For all practical purposes, all source code will be written this way, with exceptions becoming ever rarer.
我一周前写了这篇文章,之后一直在苦苦思索我是否相信它的前提,即在几年内,通过 prompting 由 LLM 编写和修改源代码将成为常态。出于所有实际目的,所有的源代码都将以这种方式编写,例外情况将变得越来越少。
Not only do I believe it, I could even see it happening in 12-18 months at the current rate of LLM progress. I think the change will have a ton of fallout, only some of it foreseeable. And one casualty might well be junior devs, in the sense that they become less marketable and it could cause various kinds of crunches across the industry.
我不仅相信,以目前 LLM 的发展速度,我甚至能预见到这在 12-18 个月内就会发生。我认为这一变化将带来大量连锁反应,其中只有一部分是可预见的。而一个牺牲品很可能就是初级开发者,因为他们会变得不那么有市场价值,这可能会在整个行业引发各种各样的危机。
We’ve already seen the big companies doing eng layoffs to make room for AI practitioners. Small companies may be faced with their own version of this decision: Why hire a junior developer to write mediocre code, when the LLM will do that for you ten times faster?
我们已经看到大公司为了给 AI 从业者腾出空间而进行工程师裁员。小公司可能也面临着他们自己版本的这个决定:当 LLM 能以十倍的速度为你写出平庸的代码时,为什么还要雇佣一个初级开发者来做同样的事呢?
So yeah. I’m worried.
所以,是的。我挺担心的。
Briefly, what do I mean by “senior” here? Really just two things:
简单说,我这里说的“资深”是什么意思?其实就两点:
- You know what you want before the AI writes it. You already have a vision for how you would write this by hand, or have it narrowed to a few reasonable options.
- You can detect when it is giving you bad guidance.
- 在 AI 写代码之前,你已经知道你想要什么。你对于如何亲手写出这段代码已经有了构想,或者已经把范围缩小到几个合理的选项。
- 你能察觉到它在给出糟糕的指导。
If you know exactly where you are driving, and you know what bad roads look like, then turbochargers can be safe and will get you there faster. If you’re not sure where you’re driving, activating the turbochargers will get you somewhere fast.
如果你清楚知道你要开往哪里,也知道糟糕的路是什么样的,那么涡轮增压器可以是安全的,并且能让你更快到达目的地。如果你不确定你要开往哪里,启动涡轮增压器只会让你很快地到达某个地方。
断网假期 (2023)
So. You’ve made it this far. Congrats!. What’s going to happen? I don’t know. Maybe we’ll get really lucky. I mean, I’d be very happy to be wrong here.
所以。你读到这里了。恭喜!接下来会发生什么?我不知道。也许我们会非常幸运。我的意思是,如果我错了,我会很高兴。
But change is coming. There will be social and cultural upheaval in tech, just as is happening in the legal profession. It’s already begun. The models are getting smarter and smarter with each passing month, which means they are going to be eating more and more jobs until they eat the world.
但变革正在到来。科技界将会发生社会和文化的剧变,就像法律界正在发生的一样。这已经开始了。模型每个月都在变得越来越聪明,这意味着它们会吞噬越来越多的工作,直到吞噬整个世界。
All I can tell you is this: Get there early. One time Googlers were complaining at TGIF that the parking garage was filling up by midmorning, and Larry Page jokingly suggested, “Maybe you should come earlier.” At that moment he reeked of billionaire. But if you really wanted to park in the garage, you took his advice.
我唯一能告诉你的是:早点到。有一次,谷歌员工在 TGIF(周五例会)上抱怨说,车库到上午中旬就停满了,拉里·佩奇开玩笑地建议:“也许你们应该早点来。”那一刻,他身上充满了亿万富翁的气息。但如果你真的想把车停进车库,你就得听从他的建议。
If you want to survive the change, you’d better show up prepared and stay on top of it.
如果你想在这场变革中生存下来,你最好有备而来,并始终保持领先。
The rest of this post is just some direct, simple, and timeless advice for junior and aspiring software engineers. I hope it can help get you through this awkward period where our industry collectively figures out what exactly the hell is going to happen.
这篇文章剩下的部分,是一些给初级和有抱负的软件工程师的直接、简单且永恒的建议。我希望它能帮助你度过这个尴尬的时期,在这个时期,我们整个行业正在集体搞清楚到底他妈的会发生什么。
死神来了 (2000)
Get good, fast. That’s what you need to do. Get ahead of the slackers while our industry turns upside down, and you might be the one to survive.
快速变强。这是你需要做的。在我们的行业天翻地覆之时,超越那些懒散的人,你可能就是那个能生存下来的人。
You are competing with students from Waterloo, who have 2+ years of actual work experience by the time they graduate with a bachelor’s in CS. You’re also competing with the top 10% of all CS grads nationwide, who are, year after year, already effectively senior engineers, despite this being their first real job.
你在和滑铁卢大学的学生竞争,他们拿到计算机学士学位时,已经有了两年多的实际工作经验。你也在和全国所有计算机专业毕业生中的前 10% 竞争,他们年复一年,尽管是第一份正式工作,实际上已经是资深工程师水平了。
Here are some shotgun recommendations. Do with them as you see fit.
这里有一些零散的建议。你可以酌情采纳。
Gain experience anywhere and any way you can, before you even leave school. Get work experience, contribute to OSS, program on the side. Take your classes seriously. Learn more than is required for passing each class. Learn each subject thoroughly, and revisit them all as you go.
在你离开学校之前,尽一切可能、在任何地方获取经验。获取工作经验,为开源项目(OSS)做贡献,做业余项目。认真对待你的课程。学习比每门课及格要求更多的东西。彻底地学习每一个科目,并在前进的过程中不断回顾它们。
Don’t over-index on programming language arcana. That’s becoming a detail that machines handle for us. Focus on algorithms, data structures, software design and engineering, discrete math, operating systems, compilers, databases, networks. Focus on studying real systems. Find walkthroughs online and study them. And of course ML. Gobble up everything you can.
不要过度关注编程语言的细枝末节。那正变成机器为我们处理的细节。专注于算法、数据结构、软件设计与工程、离散数学、操作系统、编译器、数据库、网络。专注于研究真实的系统。在网上找一些系统剖析文章来学习。当然还有机器学习(ML)。尽可能地吞噬一切知识。
Understand how things are built. Make sure you know how every system in a computer works. Make sure you have an understanding of how every cloud service you depend on does its job. Read the docs, and then read the design docs. You won’t have to write any of it by hand. But you need to develop a senior programmer’s sensibilities around how these things fit together and interact, for good or ill.
理解事物是如何构建的。确保你了解计算机中每个系统的工作原理。确保你理解你所依赖的每个云服务是如何工作的。阅读文档,然后阅读设计文档。你不需要亲手写任何这些东西。但你需要培养一种资深程序员的感觉,去理解这些东西是如何组合在一起并相互作用的,无论是好是坏。
Learn how to use frontier models to check other LLM models’ work. Sign up for multiple services (e.g. Claude and ChatGPT) and send your important prompts to at least two big models. Have them evaluate each other’s responses and study it all carefully. LLMs are better at reviewing and critiquing their own content than they are at producing it. So use a second LLM as your senior partner.
学会使用前沿模型来检查其他 LLM 模型的工作。注册多个服务(例如 Claude 和 ChatGPT),把你重要的 prompt 发给至少两个大模型。让它们互相评估对方的回答,并仔细研究。LLM 在审查和批判自己内容方面,比在生成内容方面做得更好。所以,把第二个 LLM 当作你的资深伙伴。
Another one of the key things that differentiates a senior developer from a junior one, in many contexts, is Operations experience. Read the O’Reilly/Google SRE book. Read it cover to cover. And find a good GitOps book, too; there seem to be quite a few to choose from. There may be no compression algorithm for experience, but fortunately a lot of that experience has been condensed and distilled. Go drink it up.
在很多情况下,区分资深开发者和初级开发者的另一个关键因素是运维(Operations)经验。阅读 O’Reilly/Google 的 SRE 书籍。从头到尾读完。也找一本好的 GitOps 书籍;市面上似乎有不少选择。经验可能没有压缩算法,但幸运的是,很多经验已经被浓缩和提炼出来了。去把它们吸收掉。
Lean hard on a coding assistant like Cody. Stay on the bleeding edge of features. A coding assistant is a powerful tool, like an IDE, and learning to master it will level you up as a programmer. CHOP involves a lot of manual context shoveling to craft your prompt. Cody does 90% of that shoveling for you, as well as copying the responses back into your code.
重度依赖像 Cody 这样的编程助手。紧跟最前沿的功能。编程助手是一个强大的工具,就像 IDE 一样,学会掌握它将提升你作为程序员的水平。CHOP 需要大量手动“铲”上下文来构建你的 prompt。Cody 为你完成了 90% 的“铲”活,还会把响应复制回你的代码里。
Most devs using chat still use raw ChatGPT for coding, even though it doesn’t help you with context fetching or data shoveling. And it’s great all by itself, though more manual work in prompt crafting. I have been using GPT directly in Emacs, with the excellent chatgpt-shell, because I’m still building Cody for Emacs so I can’t use it yet. Raw GPT-4o is still great.
大多数使用聊天的开发者仍然使用原生的 ChatGPT 进行编码,尽管它在获取上下文或处理数据方面帮不上忙。它本身也很棒,只是在构建 prompt 时需要更多手动工作。我一直在 Emacs 中直接使用 GPT,用的是优秀的 chatgpt-shell,因为我还在为 Emacs 构建 Cody,所以暂时还用不了。原生的 GPT-4o 仍然很棒。
I used to tell people to master an IDE, and even better, also Emacs or Neovim. But I’m not sure anymore. That might become obsolete soon. Wait until the coding assistants can do it for you; it won’t be long. Or even come help.
我过去常常告诉人们要去精通一个 IDE,更好的是,再精通 Emacs 或 Neovim。但我现在不确定了。这可能很快就会过时。等到编程助手能为你做这些事吧;不会太久了。或者甚至来帮忙一起构建。
It doesn’t matter what approach you take, as long as you start making heavy use of chat in programming. Because that, friendo, is how it works now. Like it or not. And you need to survive it. Good luck to you.
你采取什么方法并不重要,只要你开始在编程中大量使用聊天就行。因为,朋友,这就是现在的工作方式。不管你喜不喜欢。而你需要幸存下来。祝你好运。
I will start a channel soon dedicated to showing the new way of programming, as I help build Cody using chop-style coding. I will use both ChatGPT directly and Cody, and they will help me build Cody. Stay tuned!
我很快会开设一个频道,专门展示新的编程方式,我会在使用 chop 风格编码构建 Cody 的过程中进行演示。我会同时使用原生的 ChatGPT 和 Cody,它们会帮助我构建 Cody。敬请关注!
I’ll also be giving a talk that touches on this and much more in August at the Enterprise Technology Leadership Summit in Las Vegas. Hope to see you there.
今年八月,在拉斯维加斯举行的企业技术领导力峰会上,我也会做一个演讲,谈及这个话题以及更多内容。希望能在那里见到你。
P.S. Thanks to Chris Smith, Gene Kim, Dominic Cooney, and Anna Noak for their thorough reviews and great suggestions.
附:感谢 Chris Smith、Gene Kim、Dominic Cooney 和 Anna Noak 的详尽审阅和宝贵建议。