A Philosophy of Software Design
Rate it:
Read between March 20 - April 27, 2023
9%
Flag icon
Complexity is anything related to the structure of a software system that makes it hard to understand and modify the system.
9%
Flag icon
If a software system is hard to understand and modify, then it is complicated; if it is easy to understand and modify, then it is simple.
10%
Flag icon
Isolating complexity in a place where it will never be seen is almost as good as eliminating the complexity entirely.
10%
Flag icon
Complexity is more apparent to readers than writers. If you write a piece of code and it seems simple to you, but other people think it is complex, then it is complex.
10%
Flag icon
Cognitive load: The second symptom of complexity is cognitive load, which refers to how much a developer needs to know in order to complete a task.
11%
Flag icon
Unknown unknowns: The third symptom of complexity is that it is not obvious which pieces of code must be modified to complete a task, or what information a developer must have to carry out the task successfully.
11%
Flag icon
One of the most important goals of good design is for a system to be obvious.
13%
Flag icon
Thus, you should not think of “working code” as your primary goal, though of course your code must work. Your primary goal must be to produce a great design, which also happens to work. This is strategic programming.
27%
Flag icon
One of the most important elements of software design is determining who needs to know what, and when.
33%
Flag icon
it is more important for a module to have a simple interface than a simple implementation.
34%
Flag icon
Before exporting a configuration parameter, ask yourself: “will users (or higher-level modules) be able to determine a better value than we can determine here?” When you do create configuration parameters, see if you can compute reasonable defaults automatically, so users will only need to provide values under exceptional conditions.
52%
Flag icon
The design of large software systems falls in this category: no-one is good enough to get it right with their first try.
54%
Flag icon
The overall idea behind comments is to capture information that was in the mind of the designer but couldn’t be represented in the code.
55%
Flag icon
Developers should be able to understand the abstraction provided by a module without reading any code other than its externally visible declarations. The only way to do this is by supplementing the declarations with comments.
78%
Flag icon
Whenever you modify any code, try to find a way to improve the system design at least a little bit in the process. If you’re not making the design better, you are probably making it worse.
86%
Flag icon
This example illustrates a general rule: software should be designed for ease of reading, not ease of writing.
94%
Flag icon
This book is about one thing: complexity. Dealing with complexity is the most important challenge in software design.