A Philosophy of Software Design (2/e) - John Ousterhout

A Philosophy of Software Design (2/e)

John Ousterhout

出版社

Yaknyam Press

出版时间

2021-07-26

ISBN

9781732102217

评分

★★★★★
书籍介绍
This book addresses the topic of software design: how to decompose complex software systems into modules (such as classes and methods) that can be implemented relatively independently. The book first introduces the fundamental problem in software design, which is managing complexity. It then discusses philosophical issues about how to approach the software design process and it presents a collection of design principles to apply during software design. The book also introduces a set of red flags that identify design problems. You can apply the ideas in this book to minimize the complexity of large software systems, so that you can write software more quickly and cheaply.
AI导读
核心看点
  • 核心观点是管理复杂度,通过分解问题实现模块独立。
  • 提出“深模块”概念,主张接口简单而内部功能强大。
  • 识别设计红旗,通过消除异常和减少依赖降低认知负荷。
适合谁读
  • 希望提升软件设计能力、减少代码复杂度的开发者。
  • 对《代码整洁之道》有争议观点感兴趣的中高级程序员。
  • 从事软件工程、计算机科学及相关领域的技术人员。
读前提醒
  • 建议结合《代码整洁之道》对比阅读,理解观点差异。
  • 关注书中关于“深模块”与“浅模块”的具体案例解析。
  • 不必拘泥于语法细节,重点吸收降低复杂度的设计哲学。
读者共识
  • 观点务实接地气,比传统整洁代码更契合现代开发实践。
  • 篇幅短小精悍,核心精华在前半部分,后半部分稍显冗余。
  • 作者是大牛,书中关于复杂度的见解极具启发性,值得推荐。

本导读基于书籍简介、目录、原文摘录、短评和书评生成,不等同于全文精读。

精彩摘录
  • "A Philosophy of Software Design Preface - The most fundamental problem in computer science is problem decomposition: how to take a complex problem and divide it up into pieces that can be solved independently. 1 Introduction ### 1.1 How to use this book - The best way to use this book is in conjunct"
  • "The best way to eliminate exception handling complexity is to define your APIs so that there are no exceptions to handle: define errors out of existence. This may seem sacrilegious, but it is very effective in practice. Consider the Tcl unset command discussed above. Rather than throwing an error wh"
  • "The second technique for reducing the number of places where exceptions must be handled is 【exception masking】. With this approach, an exceptional condition is detected and handled at a low level in the system, so that higher levels of software need not be aware of the condition. Exception masking i"
  • "One common cause of information leakage is a design style I call temporal decomposition. In temporal decomposition, the structure of a system corresponds to the time order in which operations will occur. Consider an application that reads a file in a particular format, modifies the contents of the f"
  • "When deciding whether to combine or separate, the goal is to reduce the complexity of the system as a whole and improve its modularity. It might appear that the best way to achieve this goal is to divide the system into a large number of small components: the smaller the components, the simpler each"
  • "One of the risks of agile development is that it can lead to tactical programming. Agile development tends to focus developers on features, not abstractions, and it encourages developers to put off design decisions in order to produce working software as soon as possible. For example, some agile pra"
  • "One of the best ways to improve your design skills is to learn to recognize red flags: signs that a piece of code is probably more complicated than it needs to be."
  • "Beautiful designs reflect a balance between competing ideas and approaches. Several chapters have sections titled “Taking it too far,” which describe how to recognize when you are overdoing a good thing."
作者简介
John K. Ousterhout is a professor of computer science at Stanford University and chairman of Electric Cloud, Inc. Ousterhout created Tcl and is well-known for his work in distributed operating systems, high-performance file systems, and user interfaces. A member of the National Academy of Engineering and recipient of the ACM Software System Award (for Tcl), he has served as professor of computer science at UC Berkeley, distinguished engineer at Sun Microsystems, and CEO of Scriptics, which he founded.
用户评论
值得五星推荐。软件设计经常是一个只可意会而难于言传的事情,作者用一本小书反复地讲出来,非常棒。书中许多道理在平时开发中已有所接触、谙于心扉,不过仍然有所收获。目前我们有许多同学写代码,但真正精于设计的同学却属凤毛麟角。我之前的一位师傅曾说过:写代码前要多思考、多设计,设计的时间要比写代码的时间多的多。诚然、良好设计的代码可以保证系统是简单的易于理解的、利于长期生长的、且健壮的。这是一门学问,是区分真正的技术高手和一般程序员的一个重要门槛。
收藏