String Kata
Brendon Page
How it made me a better developer
Me
twitter @brendonpaginate
blog http://geekswithblogs.com/brendonpage
Software Developer @ Chillisoft
Term Keeping
30 minutes
every
morning
Story
String Calculator Kata?
Code
kata
TDD
cadence
String Calculator Kata
“”  0
“1”  1
“1,2”  3
//[***][%%]n1***2%%3  6
Chillisoft Rules
Intent
revealing
names
This should be easy
Let’s do this thing
Oh noes this is hard!
First Attempt
Slow improvement
Slowly growing confidence
Light bulb moments
Bursts of improvement
Oh yea!
< 30 minutes
You’re doing it wrong!
First assessment
More improvement
Struggle to go from 30 -> 20
Oh yea!
< 20 minutes
Grrrr …
Okay now record it
Oh yea!
Recorded run in < 20 minutes
Fail
Refactored while under the red
Profit!
Perfect recorded run in < 20 minutes
How Many Times?
Well done
you are now so damn awesome
at writing a string calculator!
I Know What You’re Thinking
But Consider
And …
Assessment
&
time limit
And …
Summary
Made
me
faster
I could stop now …
Pattern
Do it every
morning
for 30
minutes
Deliberate Practice Model
Reach for
target
PDCA Cycle
Do
Why Deliberate Practice?
Insulated
pathways are
more effective
Why Deliberate Practice?
Skills are
insulated
neural
pathwaysAnd it grows
slowly!!!
How?
Learning
to touch type
example
Apply the Model
Reach for
target
First Attempt
Facebook
typing
speed test
Chunk it up
Second Attempt
Typing
tutor
beginning
lessons
Don’t worry
slow accurate repetition
is good.
Slow
Repeat it
Typing
tutor
beginning
lessons
Repeat it more
Typing
tutor
beginning
lessons
Struggle
Try stay in the space
just beyond your
current abilities
Bigger chunks
Typing
tutor later
lessons
Choice
Summary
Become better
by deliberately developing the
skills you want
Thank you!
Questions?

String kata in 20 minutes

Editor's Notes

  • #7 9 steps, string input, summed output 1) “”, “1”, “1,2” 2) “1,2,3,4,5” 3) “1\n2,3” 4) “//[^]\n1^2” 5) No negative number allowed 6) Ignore numbers > 1000 7) “//[^^^^]\n1^^^^2” 8) //[*][%]\n1*2%3 9) “//[***][%%]\n1***2%%3”
  • #8 Strict TDD Clean code (yes from the book) Intent revealing names Verb-phrase method names Methods must be small, do one thing and have no side effects Code must be DRY No debugger allowed Must be able to explain what and why you are doing something Why did you do that refactoring now? Why did you choose that test to write next? And no mouse!!!! When you get it in < 30 minutes, get it assessed
  • #33 Chunk it up Break it into chunks Slow it down Absorb the whole thing Repeat it Feel it Productive uncomfortable terrain located just beyond our current abilities, where our reach exceeds our grasp. Deliberate practice isn’t just about struggling; it’s about seeking out a particular struggle, which involves a cycle of distinct actions (Deliberate Practice Model).
  • #36 Break it into chunks
  • #38 Slow down
  • #39 Repeat it
  • #40 Repeat it
  • #41 Productive uncomfortable terrain located just beyond our current abilities, where our reach exceeds our grasp. Deliberate practice isn’t just about struggling; it’s about seeking out a particular struggle, which involves a cycle of distinct actions (Deliberate Practice Model).