← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 1971.o.1.b.1.a.1.c

设计文档补足代码语义

理解等级:中级

代码精确规定程序行为,却可能让读者陷入细节,难看出行为背后的领域含义;口头讨论能解释含义,却难以留存和共享。设计文档应补上二者的缺口:说明核心概念、整体结构与设计意图,并用少量局部图辅助定位代码。重复抄录实现细节既增加阅读负担,也容易随代码演化而过期。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 原书第02章|Documents and Diagrams · 查看原书依据

      A document shouldn't try to do what the code already does well. The code already supplies the detail. It is an exact specification of program behavior. Other documents need to illuminate meaning, to give insight into large-scale structures, and to focus attention on core elements.

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第20章《原书第02章|Documents and Diagrams》(源文件:_epub-src/0321125215_ch02lev1sec4.html) - 结论依据:原文比较代码、口头交流和书面文档的表达能力,要求文档解释含义、宏观结构及核心元素,补充代码和谈话,不重复代码擅长的细节。 - 原始内容:A document shouldn't try to do what the code already does well . The code already supplies the detail. It is an exact specification of program behavior. Other documents need to illuminate meaning, to give insight into large-scale structures, and to focus attention on core elements. ... Written documents should complement the code and the talking.