提问 HN:如果编码速度加快,架构应该在哪里进行?
2 分•作者: karlosh•3 个月前
如果编码速度加快,架构应该在哪里进行?
一个功能可以运行。测试通过。PR 也不大。业务希望进行实时测试。没有人希望因为在当时听起来可能很抽象的架构问题而阻碍价值交付。
但这种情况似乎变得越来越难。
AI 辅助开发、氛围编码、内部工具和更好的框架都降低了生成代码的摩擦。这很有用。团队可以更快地进行原型设计并尽早发布实验。
问题是架构判断并没有变得同样廉价。
代码可能可以运行,但仍然会使系统变得更糟:逻辑重复、所有权不明确、模式不一致、安全漏洞、糟糕的边界、本应可重用的一次性组件,或者以后难以删除的功能。
一种选择是在代码审查中强制进行更多架构设计。但这样一来,PR 就会变得缓慢、令人沮丧,并且充满了设计争论,而这些争论在代码已经存在之后就很难解决了。
另一种选择是更快地合并,同时使合并后的架构反馈循环更加明确。架构应该已经是持续的,但更快的代码创建可能需要更强大的合并后机制:审查系统级别的更改、检查重用机会、重新评估安全假设、安排重构、将功能置于标志之后,并愿意禁用或重写内容。
这只有在“稍后重构”成为一个实际过程而不是一个愿望时才有效。
随着代码变得更容易生成,您的团队是否改变了处理架构的方式?您是在合并之前、合并之后还是通过某种持续审查过程来处理这个问题?
查看原文
If coding gets faster, where should architecture happen?<p>A feature works. The tests pass. The PR is not huge. The business wants to test it live. Nobody wants to block value delivery because of an architecture concern that may sound abstract in the moment.<p>But this seems to be getting harder.<p>AI-assisted development, vibe coding, internal tooling, and better frameworks all reduce the friction of producing code. That is useful. Teams can prototype faster and ship experiments sooner.<p>The problem is that architectural judgment has not become equally cheap.<p>The code may work and still make the system worse: duplicated logic, unclear ownership, inconsistent patterns, security gaps, bad boundaries, one-off components that should have been reusable, or features that are hard to remove later.<p>One option is to force more architecture into code review. But then PRs become slow, frustrating, and full of design debates that are difficult to resolve after the code already exists.<p>Another option is to merge faster, while making the architecture feedback loop after merge much more explicit. Architecture should already be continuous, but faster code creation may require stronger post-merge mechanisms: reviewing what changed at the system level, checking reuse opportunities, reassessing security assumptions, scheduling refactors, keeping features behind flags, and being willing to disable or rewrite things.<p>That only works if “refactor later” is an actual process, not a wish.<p>Has your team changed how it handles architecture as code has become easier to produce? Do you handle this before merge, after merge, or through some continuous review process?