Simple Isn’t Easy
Watched a video by Rich Hickey who explains the differences and similarities between ‘simple’ and ‘easy’.
Word Origins:
Simple:
‘one braid, one fold’ = ‘one task, one concept’
Easy:
‘lie near’ = ‘near at hand, familiar, near to our understanding’
“Easy is relative”, this means that what might be easy to you, might not be easy to me.
Limits: We all have them.
- We can only expect to make things reliable that we understand.
- We can only consider a few things at a time.
In order to change your code without fear, you have must have the ability to reason about your program. This is the nature of debugging.
Speed:
- Emphasizing ease gives early speed, but ignoring complexity in programming will slow you down in the long haul. (i.e The tortoise and the hare)
- Complex does not always equate to “hard”, many complicated constructs are inherently “easy” to use, the idea is that these constructs will yield complexity.
Benefits of simplicity:
- Easy to understand and change
- Offers a level of flexibility
USING PARENTHESES IS HARD! (But using them helps to add structure to data for grouping and makes things easier)
When using new ‘tools’ its important to ask “What’s the trade-off?”, “Is there any downside to this?”, “Was there anything bad that came along with this?”
“Complect”- its bad!- it means to ‘interleave, entwine, braid’- don’t do it!
This is the source of complexity!
“Composing”- ‘to place together’- this is good!
Composing simple components is the key to writing robust software.
‘State’ complects value and time; interweaves everything that touches it, but is easy in at-hand and familiar senses.
Environmental Complexity is inherent.
What
Specify inputs, outputs, and semantics: only use values and other abstractions in their definitions.
Who
- Build from and pursue subcomponents
- Don’t complect with component details and other entities
How
- By implementing logic
- Go for abstractions that don’t dictate how
When, Where
- Avoid complecting these with anything in your design
- Use queues
Why
- Policy and rules of application
- Often strewn everywhere in conditionals and complected with control flow
- Explore rules and declarative logic systems
Information is simple….don’t ruin it!
Represent data as data!
Simplify by disentagling!