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 i...
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
作者简介
· · · · · ·
John Ousterhout is the Bosack Lerner Professor of Computer Science at Stanford University. His current research focuses on new software stack layers to allow datacenter applications to take advantage of communication and storage technologies with microsecond-scale latencies. Ousterhout's prior positions include 14 years in industry, where he founded two companies (Scriptics and...
John Ousterhout is the Bosack Lerner Professor of Computer Science at Stanford University. His current research focuses on new software stack layers to allow datacenter applications to take advantage of communication and storage technologies with microsecond-scale latencies. Ousterhout's prior positions include 14 years in industry, where he founded two companies (Scriptics and Electric Cloud), preceded by 14 years as Professor of Computer Science at U.C. Berkeley. He is the creator of the Tcl scripting language and is also well known for his work in distributed operating systems and storage systems. Ousterhout received a BS degree in Physics from Yale University and a PhD in Computer Science from Carnegie Mellon University. He is a member of the National Academy of Engineering and has received numerous awards, including the ACM Software System Award, the ACM Grace Murray Hopper Award, the National Science Foundation Presidential Young Investigator Award, and the U.C. Berkeley Distinguished Teaching Award.
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 conjunction with code reviews.- 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.
- When applying the ideas from this book, it’s important to use moderation and discretion.- This means that the greatest limitation in writing software is our ability to understand the systems we are creating.
- There are two general approaches to fighting complexity, both of which will be discussed in this bo... (查看原文)
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 when unset is asked to delete an unknown variable, it should have simply returned without doing anything. I should have changed the definition of unset slightly: rather than deleting a variable, unset should ensure that a variable no longer exists. With the first definition, unset can’t do its job if the variable doesn’t exist, so generating an exception makes sense. With the second definition, it is perfectly natural for unset to be invoked with the name of a variable that doesn’t exist. In this ... (查看原文)
Read on my blog: [https://linghao.io/notes/a-philosophy-of-software-design] [A Philosophy of Software Design] is a short yet to-the-point book on high level ideas on how to design a software system with less complexity. It’s a book I would recommend to eve...
(展开)
很早就耳闻这本书,通过作者的演讲视频了解过里边的主要观点。确实是很薄的小书,很快就看完了,总体觉得还是挺不错的,但也算不上石破天惊。 书中前半部分1-10章重点讲软件复杂度以及本书核心观点(modules should be deep),是精华所在。后面几乎花了7-8章来讲注释和命名风格...
(展开)
John Ousterhout, the author of this book who has built a number of influential systems (Tcl / Tk, Raft, RAMcloud, etc), has ever gave an impressive [talk at Google] which covers the same theme. In that talk, he asked the audience, "If you had to pick one id...
(展开)
The most important idea is still simplicity: not only does simplicity improve a system's design, but it usually makes systems faster. Clean design and high performance are compatible.
(展开)
1. complexity is incremental:you have to sweat the small stuff 2. working code isn’t enough 3. make continual small investments to improve system design 4. interfaces should be designed to make the most common usage as soon as possible 5.module should be d...
(展开)
0 有用 Shane 2022-03-28 15:40:11
赞👍
1 有用 对我就是那个谁 2019-09-28 10:13:34
模块划分是一门艺术。这不是一本讲述了严格规则的书,每个人看过之后可能都会有所得,但能拿走多少就看个人悟性。你可以不同意这本书的很多理念,但不能否认它的启发性。
1 有用 热情花招 2021-11-25 16:41:49
A clean, simple, and obvious design is a beautiful thing
0 有用 Hax 2021-12-28 23:31:42
复杂度
0 有用 大男孩 2022-02-15 17:52:24
提供了一些新的视角,有借鉴意义。
0 有用 迷糊蛋儿 2022-12-16 21:55:17 北京
同事群推荐 短小中肯
0 有用 milanow 2022-11-28 23:29:55 北京
大道至简,你学到的所有principles都是为了最后忘掉的~
0 有用 - 2022-11-03 15:05:17 湖北
看了几章和工作中遇到的问题非常一致,总结的很好。
0 有用 王长史登茅山 2022-10-15 03:01:07 美国
开拓一个新体系,如何评价code的好坏。不夸张的说,此书于code quality犹如牛顿之于物理。
0 有用 ブラシカ 2022-10-09 16:18:38 浙江
适合一年左右的工程师阅读,其实很多软件开发的最佳实践都能在工作中得出,不同的书籍只是从不同的方面解释作者的经验,和背后共同的最佳实践。