A Philosophy of Software Design
★★★★☆
This short book provides a compilation of 15 common software design patterns including abstraction layers, module complexity, and interface implementation. It was quite an easy read and you likely have heard about these principles before. For each design principle, the author provided “Red Flags” to watch out for when writing software and during code reviews - the author mentions that it is easier to see design problems in someone else’s code than in your own. Overall, I thought it was a decent book to gain some high-level intuition of how to design “good” software that is extensible.
15 Design Principles:
- Complexity is incremental: you have to sweat the small stuff.
- Working code isn’t enough.
- Make continual small investments to improve systems design.
- Modules should be deep.
- Interfaces should be designed to make the most common usage as simple as possible.
- It’s more important for a module to have a simple interface than a simple implementation.
- General-purpose modules are deeper.
- Separate general-purpose and special-purpose code.
- Different layers should have different abstractions.
- Pull complexity downward.
- Define errors (and special cases) out of existence.
- Design it twice.
- Comments should describe things that are not obvious from the code.
- Software should be designed for ease of reading, not ease of writing.
- The increments of software development should be abstractions, not features.