A Philosophy of Software Design
Rate it:
Open Preview
Read between June 28 - July 12, 2025
5%
Flag icon
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.
6%
Flag icon
The larger the program, and the more people that work on it, the more difficult it is to manage complexity.
7%
Flag icon
The first approach is to eliminate complexity by making code simpler and more obvious.
7%
Flag icon
The second approach to complexity is to encapsulate it, so that programmers can work on a system without being exposed to all of its complexity at once. This approach is called modular design.
8%
Flag icon
Complexity is anything related to the structure of a software system that makes it hard to understand and modify the system.
Mindaugas Mozūras
I prefer Hickey's definition
9%
Flag icon
Change amplification: The first symptom of complexity is that a seemingly simple change requires code modifications in many different places.
9%
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.
10%
Flag icon
Sometimes an approach that requires more lines of code is actually simpler, because it reduces cognitive load.
10%
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.
12%
Flag icon
The tactical tornado is a prolific programmer who pumps out code far faster than others but works in a totally tactical fashion. When it comes to implementing a quick feature, nobody gets it done faster than the tactical tornado. In some organizations, management treats tactical tornadoes as heroes. However, tactical tornadoes leave behind a wake of destruction. They are rarely considered heroes by the engineers who must work with their code in the future.
18%
Flag icon
A shallow module is one whose interface is complicated relative to the functionality it provides. Shallow modules don’t help much in the battle against complexity, because the benefit they provide (not having to learn about how they work internally) is negated by the cost of learning and using their interfaces. Small modules tend to be shallow.
21%
Flag icon
When designing modules, focus on the knowledge that’s needed to perform each task, not the order in which tasks occur.
24%
Flag icon
I have found over and over that specialization leads to complexity; I now think that over-specialization may be the single greatest cause of complexity in software.
Mindaugas Mozūras
suspect
32%
Flag icon
A pass-through method is one that does nothing except pass its arguments to another method, usually with the same API as the pass-through method. This typically indicates that there is not a clean division of responsibility between the classes.
36%
Flag icon
it is more important for a module to have a simple interface than a simple implementation.
42%
Flag icon
Each method should do one thing and do it completely. The method should have a simple interface, so that users don’t need to have much information in their heads in order to use it correctly. The method should be deep: its interface should be much simpler than its implementation. If a method has all of these properties, then it probably doesn’t matter whether it is long or not.
47%
Flag icon
Overall, the best way to reduce bugs is to make software simpler.
dantelk liked this