Skip to content

Instantly share code, notes, and snippets.

@inadarei
Last active April 18, 2019 21:54
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inadarei/494f062f58beaca742b9 to your computer and use it in GitHub Desktop.
Save inadarei/494f062f58beaca742b9 to your computer and use it in GitHub Desktop.
state vs capability thinking

State-oriented thinking

  1. Find me users whose names are "john"
  2. Retrieve current state of that user, for each user. Start loop:
  3. Is their name still "john"?
  4. Update the state of the user object so their name is now "johnnie"
  5. Clean-up loop

Capabilities-oriented exchange

  1. Please rename all "johns" to "johnnie". Don't care/need to know how you store, handle or process it. Just get it done. If tomorrow you redesign your object store, my capability should still work.

Last words:

We think in state-centric ways, and then we are surprised that our interactions are "chatty" and our systems are fragile, not evolvable. Duh!

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