Triangle.rb Notes - Code Katas

Code Katas: Growing Through Deliberate Practice

2015-04-14 by Cory Foy (Meetup) (blog post)

Takeaways

  • Test First
  • Simple Solution
  • Judicious Refactoring
  • Elegance Emerged

Four Rules Of Simple Design

  1. Runs all the tests
  2. No duplication
  3. Expresses developer intent
  4. Minimizes number of classes and methods

We have become afraid of what will happen naturally. Christopher Alexander

Dreyfus Model Of Skills Acquisition

  1. Novice - needs lot of context, explicit instructions
  2. Advanced Beginner - starts trading instructions for intuition
  3. Competent
  4. Proficient
  5. Expert - relies almost entirely on intuition

Steps

  1. Discover the problem
  2. Discover how to solve it
  3. Solve it

Examples

  • test first
  • new languages
  • no tests
  • vim versus emacs
  • tmux versus multiple windows

Inspiration