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

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

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

一个 Hacker News 帖子讨论了一篇文章,该文章声称 AI 编码工具已将开发者“晋升”为架构师。评论者对这是否真实存在分歧:一些人说设计和反对意见一直是工程的一部分,而另一些人指出许多开发者只实现分配的规格,缺乏架构经验。担忧包括 AI 生成的代码造成安全/性能权衡、冗余数据模型、过多日志和新漏洞。几位评论者描述了角色膨胀——开发者现在还承担 PM、架构和 QA 任务,却没有相应薪酬——而另一些人警告说团队只需要少量架构师,因此这种转变可能意味着更少的岗位或更低薪酬,而非真正的晋升。还有一些人认为架构本身可能被自动化,并批评文章的叙述框架反映了对 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