Practice To Learn
Using Code Kata to Explore Software Development
Monday, March 12, 12
Slide 2
Slide 2 text
Equipment
The following in your PATH:
https://github.com/hoodja/practice-to-learn
javac - Java 6 compiler
java - Java 6 JVM
python - Python 2.7 interpreter (not 3.0)
g++ - GCC 4.2 or later (tested on Windows using MinGW)
Monday, March 12, 12
Slide 3
Slide 3 text
Monday, March 12, 12
Slide 4
Slide 4 text
Craftsmanship
Monday, March 12, 12
Slide 5
Slide 5 text
Monday, March 12, 12
Slide 6
Slide 6 text
You do deliberate practice to improve your
ability to perform a task. It’s about skill and
technique. Deliberate practice means repetition.
It means performing the task with the aim of
increasing your mastery of one or more aspects
of the task.
-- Jon Jagger
Monday, March 12, 12
Slide 7
Slide 7 text
In software we do our practicing on the job,
and that’s why we make mistakes on the job. We
need to find ways of splitting the practice from
the profession.
We need practice sessions.
-- Dave Thomas
Monday, March 12, 12
Slide 8
Slide 8 text
Code Kata:
Deliberate Practice Sessions
Monday, March 12, 12
Slide 9
Slide 9 text
Kata
detailed
choreographed
patterns of movement
performed solo or in pairs
Monday, March 12, 12
Slide 10
Slide 10 text
Warm Up
Prime Factors
http://xkcd.com/5/
Monday, March 12, 12
Slide 11
Slide 11 text
Prime Factors
10
Monday, March 12, 12
Slide 12
Slide 12 text
Prime Factors
2 10
Monday, March 12, 12
Slide 13
Slide 13 text
Prime Factors
2
5
10
Monday, March 12, 12
Slide 14
Slide 14 text
Prime Factors
30030
Monday, March 12, 12
Slide 15
Slide 15 text
Prime Factors
2 30030
15015
Monday, March 12, 12
Slide 16
Slide 16 text
Prime Factors
2
3
30030
15015
5005
Monday, March 12, 12
Slide 17
Slide 17 text
Prime Factors
2
3
5
30030
15015
5005
1001
Monday, March 12, 12
Slide 18
Slide 18 text
Prime Factors
2
3
5
7
30030
15015
5005
1001
143
Monday, March 12, 12
Slide 19
Slide 19 text
Prime Factors
2
3
5
7
11
30030
15015
5005
1001
143
Monday, March 12, 12
Slide 20
Slide 20 text
Prime Factors
2
13
3
5
7
11
30030
15015
5005
1001
143
Monday, March 12, 12
Slide 21
Slide 21 text
Algorithm:
store 2 into candidate
if: candidate evenly divides n
add candidate to primes
store n / candidate into n
else: increment candidate
repeat until n is 1
Monday, March 12, 12
Things You Can Do
Find and master a kata
google
codekata.pragprog.com
youtube
Create a study guide for your kata
“I teach and I understand”
Monday, March 12, 12
Slide 41
Slide 41 text
Things You Can Do
Get. Started.
Monday, March 12, 12
Slide 42
Slide 42 text
Things You Can Do
Keep. Going.
Monday, March 12, 12
Slide 43
Slide 43 text
Institutionalized Code Kata
Three-week “class”
Meet at the same time, 30 minutes each day.
Follow a “master”, performing the kata
Over time introduce new challenges or learning
Monday, March 12, 12
Slide 44
Slide 44 text
Code Kata is not completing a
trite programming challenge once.
Monday, March 12, 12
Slide 45
Slide 45 text
Practice To Learn...
a new language
a new development environment
a new programming style
a new human being
Monday, March 12, 12