202508291315
Status: #idea
Tags: #software #design #programming
# A philosophy of software design
Software design is fundamentally about managing complexity. Good design makes software easier to understand, modify, and extend. The core principles of good software design include:
1. **Deep modules** - modules should have simple interfaces but powerful functionality
2. **Information hiding** - implementation details should be hidden behind well-defined interfaces
3. **General-purpose modules** - design for multiple use cases rather than specific ones
4. **Define errors out of existence** - design APIs that make it hard to create bugs
5. **Write comments that explain why, not what** - code shows what, comments should explain reasoning
The best modules are those that provide powerful functionality through a simple interface.
## Related Ideas
- [[Deep modules are preferable over shallow modules]]
- [[Different layers should have different abstractions]]
- [[Information hiding in module design]]
- [[General purpose modules tend to be deeper]]
- [[Complexity in software development and design]]
- [[Pull complexity downwards when possible]]
---
# References
A Philosophy of Software Design by John Ousterhout