009 RR What Makes Beautiful Code
Ruby-Chan Why Beautiful Code?
- You know your code is written correctly by looking at it.
- Knots metaphor - If it’s shaped right, you know it’ll hold.
- The shape in your mind matches the shape on the page Evaluating code:
- Eric Hodel - Audio evaluator of code
- Reveals the intention to someone Practices:
- 80 character limit
- 1 statement per line
- Comments are code smells
- Engage more senses-use more parts of the brain
- Short functions/methods
- Morph the language into the language of the problem domain (DSL’s)