Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save coprolit/12271c8f8562f0ad7b8feaac52aaadaa to your computer and use it in GitHub Desktop.

Select an option

Save coprolit/12271c8f8562f0ad7b8feaac52aaadaa to your computer and use it in GitHub Desktop.
A few guidelines for sustainable software

A few guidelines 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 stateful 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment