我们把开发者晋升为架构师却没有通知他们
We promoted developers into architects without informing them

原始链接: https://manidoraisamy.com/developer-to-architect.html

一段 vibe-coded 的日志功能让插件欢迎屏幕耗时 15 秒,因为它试图通过多次 Google API 调用获取用户邮箱/ID。更好的做法是只记录安装时间戳,或异步获取用户数据,同时拒绝损害性能的需求。AI 能实现需求,但不会做架构权衡、抵制糟糕需求,也不会理解规模;它还倾向于安全和向后兼容,这会拖慢应用并产生冗余数据模型。开发者必须从编码转向架构:定义数据模型,将 AI 约束在该设计内,决定兼容性,并审查生成的代码。这份工作不会消失,而是从实现演变为架构监督。

HN 讨论串讨论一篇声称 AI 实际上已将开发者提升为架构师的文章。评论者争论架构是否一直是软件工程的一部分:许多人说优秀开发者早已进行设计、提出反对意见并承担决策;而专职架构师常被批评为脱离实际或微观管理,不过有些能提供有价值的跨团队上下文。其他人认为 AI 加速了编码,但权衡、性能、安全和规模仍需人类判断;AI 可能阿谀奉承,并可能实现低效或不安全的模式。有几人指出初级工程师可能被训练成按详细工单执行,引发对失去主人翁意识和技能退化的担忧。劳动市场相关评论警告,生产力提升可能减少需求、薪资或初级岗位机会,而有些人认为 AI 能促成更大项目。总体而言,共识倾向于认为 AI 转移了实现负担,但并未消除对人类架构判断、上下文和问责的需求。
相关文章

原文

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:

  1. First, try to get the email if the user gave consent to share it during installation.
  2. If it fails, it would try to fetch his user ID.
  3. If that fails, it would log an error saying the user has installed, but we don’t know his email or user ID.

All of these are one line of code, but internally each of these makes multiple API calls to Google servers. Since logging was the first line to execute after installation, the welcome screen took 15 seconds to load.

What is the right code for this?

If you are a senior developer or architect who understands the number of API calls behind each method, you would have:

  1. Logged just the timestamp of the install instead of trying to fetch the email or user ID, and told the marketing team they won’t be able to send the follow-up email based on installation alone.
  2. Or, if marketing wants the user’s email on install, you would have shown the welcome screen first and logged the email or user ID asynchronously from the browser, while the user is looking at the welcome screen. But calling your server from the addon’s welcome screen might require your server to bypass security and log an unauthenticated payload.

In other words, your job as an architect is to push back on requirements that can slow down the app. Or, find a way to work around the performance and security issues by making it async or accepting a reasonable hack.

Why AI won’t push back

AI is great at writing code. But it doesn’t know if you are launching the app or have millions of users, which it needs to make the right architecture call to log a timestamp vs email. It is also sycophantic and tries to execute your requirements exactly without pushing back, which means you end up with a slow app that takes 15 seconds to load a static welcome screen.

Essentially, if you generate code by specifying your requirements instead of specifying your architecture, AI will decide the architecture on your behalf. It is so paranoid about security that it will never write code to accept an unauthenticated payload. Even if you write it yourself, it will rewrite it into an authenticated payload and screw up performance or force users to sign in again on your app.

Your new job is to architect

AI coding tools are tuned to implement your functional requirements and two non-functional requirements, i.e. security and backward compatibility to avoid breaking your app. This invariably leads to:

  1. Architecture that trades off performance for security and slows down the app.
  2. Multiple versions of datamodel design with redundant tables, columns and code.

That means you define the architecture, design the datamodel first and ask AI to code within that constraint. Every time you give a requirement that changes your architecture or design, coding tools have to ask you before changing it, instead of changing it on their own. You have to tell it when it needs to be backward compatible, so it’s ok to keep multiple versions of logic or database tables, and when to delete the old logic and tables and keep a single version for maintainability.

If you are an architect who is used to designing the datamodel, delegating the implementation to developers and then reviewing their code to see if they have implemented it correctly, this should be natural to you. But the problem is that today we have taken developers who were great at coding and moved them into an architect’s job. They see that the job they love, i.e. coding, is now completely done by AI. But nobody has told them about the new job of pushing back on requirements, designing the datamodel, constraining AI to their architecture and reviewing that it falls in line. This is the reason for all the confusion and hate among developers about vibe coding.


Your future as developer

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. 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.

联系我们 contact @ memedata.com