Simple Made Easy

“Simple Made Easy” - Rich Hickey (2011)

TL;DR Link to heading

  • Simple vs. easy: simple means is not complex or entangled. Easy means familiar or near to our understanding.
  • Construct vs. Artifact: construct is the codebase. Artifact is what we deliver
  • We can make software simple by choosing constructs with simpler artifacts and avoiding constructs that have complex artifacts.
  • Human limits: we can only keep a few things in our mind at a time
  • The Complexity vs. Simplicity part was to abstract and doesn’t have code examples

Simple vs. Easy Link to heading

Simple Link to heading

  • one fold/braid: one role, one task, one concept
  • but not: one instance, one operation
  • about lack of interleaving, not cardinality
  • objective

Easy Link to heading

  • Near(by), at hand: on our hard drive, in our tool set, IDE, apt get, gem install, etc.
  • Near to our understanding/skill set: familiar
  • Near to our capabilities
  • Easy is relative, unlike simple

Construct vs Artifact Link to heading

  • Construct is the codebase
  • Artifact is what we deliver
  • We focus on experience of use of construct (programmer convenience and replaceability) rather than the long term results of use (software quality, correctness, maintenance, change)
  • We must assess contructs by their artifacts

Human Limits Link to heading

Misc Link to heading

If you want everything to be familiar, you will never learn anything new, because it can’t be significantly different from what you already know.

  • Changes to software require analysis and decisions; What will be impacted? Where do changes need to be made?
  • Debugging: all bugs pass the type checker and all the tests. All guard rails will fail
  • Development Speed: emphasizing ease gives early speed, but ignoring complexity will slow you down over the long haul
  • Software can be easy, but complex. Many complicating constructs are: succinctly described; familiar; available; easy to use.
  • Benefits of Simplicity: ease understanding, changing, debugging, flexibility
  • State is easy (in the at-hand and familiar senses), but it is never simple.
  • There is the environmental complexity: shared resources, e.g. memory, CPU, etc. It’s inherent (not your fault).
  • Simplicity is a Choice: requires vigilance, sensibilities and care
  • Information is Simple. Don’t ruin it by hiding it behind micro-language (i.e. a class with information-specific methods). Represent data as data, no nned to write a class for every new data.
    • Missing examples

Complexity vs. Simplicity Link to heading

  • Missing examples
ComplexitySimplicity
State, ObjectsValues
MethodsFunctions, Namespaces
varsManaged refs
Inheritance, switch, matchingPolymorphism a la carte
SyntaxData
Imperative loops, foldSet funcitons
ActorsQueues
ORMDeclarative data manipulation
ConditionalsRules
InconsistencyConsistency

The Complexity Toolkit Link to heading

  • Missing examples
ConstructComplects
StateEverything that touches it
ObjectsState, identity, value
MethodsFunction and state, namespaces
SyntaxMeaning, order
InheritanceTypes
Switch/matchingMultiple who/what pairs
var(iable)sValue, time
Imperative loops, foldwhat/how
Actorswhat/who
ORMOMG
ConditionalsWhy, rest of program

The Simplicity Toolkit Link to heading

  • Missing examples
ConstructGet it via…
Valuesfinal, persistent collections
Functionsa.k.a. stateless methods
Namespaceslanguage support
DataMaps, arrays, sets, XML, JSON, etc.
Polymorphism a la carte(Clojure) Protocols, (Haskell) type classes
Managed refsClojure/Haskell refs
Set functionsLibraries
QueuesLibraries
Declarative data manipulationSQL/LINQ/Datalog
RulesLibraries, Prolog
ConsistencyTransactions, Rules

Abstraction for Simplicity Link to heading

  • vs Abstraction as complexity hiding
  • I don’t know, I don’t want to know
  • Who, What, When, Where, Why and How
    • He lost me at that part

Simplicity Made Easy Link to heading

  • Choose simple constructs over complexity-generating constructs
    • It’s the artifacts, not the authoring
  • Create abstractions with simplicity as a basis
  • Simplify the problem space before you start
  • Simplify often means making more things not fewer