We promoted developers into architects without informing them
Title: We promoted developers into architects without informing them
Yesterday, I was debugging a performance problem with our Google Forms addon. It turned out my colleague had vibe coded the logging part, so that he could monitor the new installs every week. Monitoring new customers is the most important part of running a business, so he is absolutely right in doing that. Except, he was logging the user’s email and Google has severely restricted how much detail you can get about the user since last December. So, AI had written a series of try/catch statements:
昨天,我正在调试我们 Google Forms 插件的一个性能问题。结果发现,我的同事用“感觉编程”(vibe coded)的方式写了日志部分,以便每周监控新安装量。监控新客户是经营业务最重要的一环,所以他这样做完全正确。但问题在于,他记录了用户的电子邮件,而自去年 12 月以来,Google 已经严格限制了你能获取的用户详细信息。因此,AI 写了一系列 try/catch 语句:
In our case, the right fix is simple. Log the timestamp, show the welcome screen first and tell marketing what they can’t get on install. But AI will never make that call for you, because it doesn’t know your users and it won’t push back on your requirements. That is the architect’s job. If you are a developer, the coding job is going away. But it doesn’t mean your job is going away. Non-developers who don’t understand architecture and design will end up with bad performance and unmaintainable database tables. So, stop missing the coding and become an architect[2]. Learn to push back on requirements, design the datamodel, constrain AI to it and review the code the way an architect reviews a developer’s code. You got promoted. Nobody told you, so I am telling you.
在我们的案例中,正确的修复方法很简单:记录时间戳,先显示欢迎屏幕,并告知市场部门安装时无法获取哪些信息。但 AI 永远不会为你做这种决定,因为它不了解你的用户,也不会对你的需求提出异议。那是架构师的工作。如果你是一名开发人员,纯粹的编码工作正在消失。但这并不意味着你的工作正在消失。不懂架构和设计的非开发人员最终会得到糟糕的性能和无法维护的数据库表。所以,别再留恋编码了,成为一名架构师吧[2]。学会对需求提出异议,设计数据模型,约束 AI 的行为,并像架构师审查开发人员代码那样去审查 AI 生成的代码。你被晋升了。没人告诉你,所以我现在告诉你。
Notes:[1] Ultimately, you have limited resources. Architecture is about trading off some requirements, so that your app can run with limited resources. Take CAP theorem as an example. You have to trade off consistency or availability or partition tolerance for your database. If you don’t understand that tradeoff and ask AI to build a database that has all 3, it would reinvent Google Spanner++ and expect Google scale datacenter to run it.[2] This post is trending on HN. Some have correctly pointed out that good developers already do architecture and bad architects propose ivory tower architecture that falls apart during implementation. I have built ivory tower architecture whenever I am handsoff. This will become more common with AI, if we don’t debug its code or don’t hand code critical parts of the app from time to time. So, don’t stop coding completely, but it’s not a full time job anymore.
注:[1] 归根结底,你的资源是有限的。架构的本质是在某些需求之间进行权衡,以便你的应用程序能在有限的资源下运行。以 CAP 定理为例,你必须在数据库的一致性、可用性或分区容错性之间做出权衡。如果你不理解这种权衡,却要求 AI 构建一个同时具备这三者的数据库,它可能会重造一个 Google Spanner++,并期望用 Google 规模的数据中心来运行它。[2] 这篇文章在 HN 上很热门。一些人正确地指出,优秀的开发人员已经在做架构工作,而糟糕的架构师则会提出在实施过程中分崩离析的“象牙塔”式架构。每当我当甩手掌柜时,我也会构建出“象牙塔”式架构。如果我们不调试 AI 的代码,或者不时常手动编写应用程序的关键部分,这种情况在 AI 时代会变得更加普遍。所以,不要完全停止编码,但它不再是一份全职工作了。
Mani - could adopting a method like spec-driven development have helped here ?
Mani,采用规范驱动开发(spec-driven development)之类的方法在这里会有帮助吗?
@斯里尼瓦萨·普拉萨纳 在这个案例中,如果你的规格不是从架构层面,而是从需求层面出发的就没有
@Srinivasa Prasanna In this case, if your specifications are based on requirements rather than architecture, it wouldn’t have helped.
“stop missing the coding”
“别再留恋编码了”
The coding was the fun part and I never wanted this promotion.
编码才是最有趣的部分,我从来没想要过这次晋升。
@Srinivasa Prasanna Could be, but it seems requirements heavy and light on architecture/design.
@Srinivasa Prasanna 也许吧,但这看起来更偏向于需求,而在架构/设计方面比较薄弱。
@Halberdus Ravenheim Me too (I literally named this blog “Developer forever”). But that doesnt answer the economic viablity question. Will companies pay for developers to code, if AI generates better code faster at a fraction of the cost? So, this promotion is inevitable and its better to set that expectation clearly.
@Halberdus Ravenheim 我也是(我甚至把这个博客命名为“永远的开发者”)。但这并没有回答经济可行性的问题。如果 AI 能以极低的成本更快地生成更好的代码,公司还会为开发人员的编码工作买单吗?因此,这种晋升是不可避免的,最好还是明确这种预期。