全部文章
实践5 分钟阅读

先写下架构,再写代码

一页文字花掉一个下午,却了结了那些否则会在三周后的 pull request 里争起来的问题。

占位稿。这篇文章作为版式骨架随文章板块一同发布,在写入真正内容之前,它不会被搜索引擎收录,也不会进入站内助手。

这篇文章以英文发表。站点其余部分已翻译,文章没有,因为一篇经过机器翻译的技术论述,价值低于用它原本语言读到的同一篇。

The argument against writing the design down is always speed. It is a bad argument, because the alternative is not "start sooner"; it is "discover the disagreement later, in code, when reversing it is expensive".

What the document is for

Not the diagram. The diagram is the easy half and the half that gets shown. The useful part is the paragraph under it explaining which parts genuinely need a model and which parts are better off deterministic, because that is the decision the whole system is downstream of.

What it is not for

It is not a specification to be followed to the letter, and treating it as one produces the padding that a technical reader notices immediately. It is a record of what was decided and why, so the next person, who is often you, can tell the difference between a considered choice and an accident.


This post is a placeholder shipped with the writing section. Replace the body with the real piece; the frontmatter above is the only thing the site reads.