Rich Hickey's Simple made Easy

Simple is not the same as easy

  • Simplicity is a measure of the ability to change a system over time.
  • Ease is a measurea of energy required to achieve a task.

Simple and Complex

  • Simple means one fold.
  • Complex means many folds.
  • They are opposites.

What is complexity?

Complexity is seen in the sense of how you create a complex pattern or structure by braiding (plaiting) or weaving.

  • Braiding interlocks strands (components/concerns) together.
  • Interlocking forms tight bonds between the strands.
  • Tight bonding between components/concerns is the problem.
  • It causes them to become indistinguishable from each other.

What are the implication of complexity?

  • We can not comprehend in isolation.
  • You have to understand it as a whole.

What does this mean for us?

  • Our capacity to comprehend complexity is finite and quite limited.
  • Statistically we do not vary that much.

Why does this matter?

  • We have to be able to analyse a system to change it.
  • Type checking and automated test are not enough.
  • Ignoring complexity is not an option.

Types of complexity

  • Essential complexity, complexity that is part of the problem you are solving.
  • Accidental complexity, complexity introduced via the tools and constructs we use.

The aim is to minimize accidental complexity.

How do we introduce complexity?

Braiding

  • Multiple concerns in a single component.
  • Tightly bonding concerns.

Complex constructs

  • State, conflates value and time.
  • Objects, conflates idenity and value.
  • Syntax, conflates meaning and order.
  • Inheritance, conflates types.
  • Variables, conflates value and time.
  • Actors, conflates what and who.
  • ORM, Oh my giddy aunt.
  • Conditionals conflate rules and program organisation.

How do we make things simple?

Chose simple constructs.

They allow you to focus on what the software is supposed to do rather than how to do it.

Examples of simple constructs:

  • Values.
  • Persistent collection.
  • Standard data strcutures.
  • Pure functions.
  • Declarative data manipulation.
  • Consistency ( transactions and values )

Abstraction: ( write simple stuff )

  • Abstraction means to draw things away, to draw away from the physical nature of something.
  • It is not hiding stuff.

Easy and Hard

The property being measured is the amount of effort or time that is needs to complete a task.

  • Ease is subjective.
  • What is easy for one person may be hard for another and vice versa.

What makes things hard?

  • Things not being near at hand.
  • Lack of familiarity.
  • Things beyond our capabilities.

How do we make things easy.

  • Make things close to hand.
  • Learn
  • Bring the problem within our capabilities.

Conclusion

  • Simplicity and Ease are not the same concept.
  • Simplicity is about efficiency (Reduction of Waste).
  • Ease is about productivity (Quickly getting stuff done).
  • They are both necessary conditions for efficiency.