软件开发中的康威定律

by kevin 6. 三月 2024 13:31 >
        "设计系统的架构受制于产生这些设计的组织的沟通结构。"康威定律是马尔文·康威1967年提出的。即系统设计本质上反映了企业的组织机构。系统各个模块间的接口也反映了企业各个部门之间的信息流动和合作方式。 康威定律包含4个子定律: 第一定律 组织沟通方式会通过系统设计表达出来 第二定律 时间再多一件事情也不可能做的完美,但总有时间做完一件事情 第三定律 线型系统和线型组织架构间有潜在的异质同态特性 第四定律 大的系统组织总是比小系统更倾向于分解 康威定律的意义具体来说,包括以下3点: 指导系统设计:系统的结构受到设计它的组织结构的影响,因此在设计系统时需要考虑到组织结构对系统的影响,尽可能地将组织结构与系统结构相匹配,以便更好地管理和... [更多...]

《Software Engineering at Google》摘抄(18)

by kevin 7. 七月 2023 13:25 >
The compiler also doesn’t know anything about how to handle external dependencies, such as third-party JAR files in Java. Often the best we can do without a build system is to download the dependency from the internet, stick it in a lib folder on the hard drive, and configure the compiler to read libraries from that directory. Over time, it’s easy to forget what libraries we put in there, where th... [更多...]

《Software Engineering at Google》摘抄(17)

by kevin 30. 十一月 2022 18:32 >
能够立即有效地浏览整个代码库意味着很容易找到相关的库来重用和好的例子来复制。 Most of the time, developers won’t notice when indices are out of date. They only care about a small subset of code, and even for that they generally won’t know whether there is more recent code. However, for the cases in which they wrote or reviewed the corresponding change, being out of sync can cause a lot of confusion. It tends not to matter whether the ... [更多...]

《Software Engineering at Google》摘抄(16)

by kevin 18. 十一月 2022 12:27 >
In all of this thinking, we’re assigning special significance to the trunk branch. But of course, “trunk” in your VCS is only the technology default, and an organization can choose different policies on top of that. Perhaps the default branch has been abandoned and all work actually happens on some custom development branch—other than needing to provide a branch name in more operations, there’s no... [更多...]

《Software Engineering at Google》摘抄(15)

by kevin 15. 十一月 2022 13:44 >
Our discussion of deprecation begins from the fundamental premise that code is a liability, not an asset. After all, if code were an asset, why should we even bother spending time trying to turn down and remove obsolete systems? Code has costs, some of which are borne in the process of creating a system, but many other costs are borne as a system is maintained across its lifetime. These ongoing co... [更多...]

《Software Engineering at Google》摘抄(14)

by kevin 9. 十一月 2022 13:53 >
Unit tests are limited by the imagination of the engineer writing them. That is, they can only test for anticipated behaviors and inputs. However, issues that users find with a product are mostly unanticipated (otherwise it would be unlikely that they would make it to end users as issues). This fact suggests that different test techniques are needed to test for unanticipated behaviors.(单元测试受到编写它们的... [更多...]

《Software Engineering at Google》摘抄(13)

by kevin 20. 十月 2022 18:27 >
Writing testable code requires an upfront investment. It is especially critical early in the lifetime of a codebase because the later testability is taken into account, the more difficult it is to apply to a codebase. Code written without testing in mind typically needs to be refactored or rewritten before you can add appropriate tests.(编写可测试代码需要前期投入。在代码库生命周期的早期,这一点尤其重要,因为越晚考虑可测试性,就越难应用到代码库中。在没有考虑... [更多...]

《Software Engineering at Google》摘抄(12)

by kevin 11. 十月 2022 13:41 >
At Google, we’ve found that engineers sometimes need to be persuaded that testing via public APIs is better than testing against implementation details. The reluctance is understandable because it’s often much easier to write tests focused on the piece of code you just wrote rather than figuring out how that code affects the system as a whole. Nevertheless, we have found it valuable to encourage s... [更多...]

《Software Engineering at Google》摘抄(11)

by kevin 1. 十月 2022 13:43 >
Unlike the QA processes of yore, in which rooms of dedicated software testers pored over new versions of a system, exercising every possible behavior, the engineers who build systems today play an active and integral role in writing and running automated tests for their own code. Even in companies where QA is a prominent organization, developer-written tests are commonplace. At the speed and scale... [更多...]

《Software Engineering at Google》摘抄(10)

by kevin 29. 九月 2022 08:28 >
Instead, before you begin writing, you should (formally or informally) identify the audience(s) your documents need to satisfy. A design document might need to persuade decision makers. A tutorial might need to provide very explicit instructions to someone utterly unfamiliar with your codebase. An API might need to provide complete and accurate reference information for any users of that API, be t... [更多...]