20 rules of thumb for writing better software.
- Optimize for simplicity first
- Write code for humans, not computers
- Reading is more important than writing
- Any style is fine, as long as it’s black
- There should be one way to do it, but seriously this time
- Hide the sharp knives
- Changing the rules is better than adding exceptions
- Libraries are better than frameworks
- Transitive dependencies are a problem
- Dynamic runtime dependencies are a bigger problem
- API surface area is a liability
- Returning early is a good thing
- Use more plain text
- Compiler errors are better than runtime errors
- Runtime errors are better than bugs
- Tooling is better than documentation
- Documentation is better than nothing
- Configuration sucks, but so does convention
- The cost of building a feature is its smallest cost
- Types are one honking great idea – let’s do more of those!
Homage and references
Any color the customer wants, as long as it’s black.
– Henry Ford (maybe)
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
―- Martin Fowler