A few rules for sustainable software
- Favor decoupled over DRY.
- Favor declarative programming (functional and reactive) over imperative programming.
- Favor composition over inheritance (organize by function, instead of type).
- Share interfaces, not implementation.
- Separate code into statefull and stateless interactions.
- Whenever possible, use stateless building blocks and push side-effects to the edges of the application.
- Favor pure functions (pure function > function > factory > class).
- Favor unidirectional data flow and single source of truth.