Upcoming SlideShare
×

# Code Kata Workshop - Improve your skills through deliberate practice

2,150 views

Published on

A code kata workshop which I was supposed to hold on the Namics Conference 2013 in Innsbruck toghether with Michael Wegener. Sadly I couldn't make it so one of my colleagues Philip Althaus jumped in for me...

3 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total views
2,150
On SlideShare
0
From Embeds
0
Number of Embeds
147
Actions
Shares
0
0
0
Likes
3
Embeds 0
No embeds

No notes for slide
• Übernahme PhilipKurzeErläuterungwiewir’s in Zürichmachen, Stichworte: Regelmässig, guteTeilnehmerzahl, kurzeProblemstellungen, Pairprogramming, Spass, ReviewErklärung der Aufgabenstellung, imNormalfallzuzweit, im Workshop aberim Plenum wegenbegrenzterZeit
• The game consists of 10 frames as shown above. In each frame the player hastwo opportunities to knock down 10 pins. The score for the frame is the totalnumber of pins knocked down, plus bonuses for strikes and spares.A spare is when the player knocks down all 10 pins in two tries. The bonus forthat frame is the number of pins knocked down by the next roll. So in frame 3above, the score is 10 (the total number knocked down) plus a bonus of 5 (thenumber of pins knocked down on the next roll.)A strike is when the player knocks down all 10 pins on his first try. The bonusfor that frame is the value of the next two balls rolled.In the tenth frame a player who rolls a spare or strike is allowed to roll the extraballs to complete the frame. However no more than three balls can be rolled intenth frame.
• Philip: Erklären das der Workshop im Plenum gehaltenwird -&gt; Michi Coded, Plenum sagt was ermachen mussThe game consists of 10 frames as shown above. In each frame the player hastwo opportunities to knock down 10 pins. The score for the frame is the totalnumber of pins knocked down, plus bonuses for strikes and spares.A spare is when the player knocks down all 10 pins in two tries. The bonus forthat frame is the number of pins knocked down by the next roll. So in frame 3above, the score is 10 (the total number knocked down) plus a bonus of 5 (thenumber of pins knocked down on the next roll.)A strike is when the player knocks down all 10 pins on his first try. The bonusfor that frame is the value of the next two balls rolled.In the tenth frame a player who rolls a spare or strike is allowed to roll the extraballs to complete the frame. However no more than three balls can be rolled intenth frame.
• Philip: Erklären das der Workshop im Plenum gehaltenwird -&gt; Michi Coded, Plenum sagt was ermachen mussThe game consists of 10 frames as shown above. In each frame the player hastwo opportunities to knock down 10 pins. The score for the frame is the totalnumber of pins knocked down, plus bonuses for strikes and spares.A spare is when the player knocks down all 10 pins in two tries. The bonus forthat frame is the number of pins knocked down by the next roll. So in frame 3above, the score is 10 (the total number knocked down) plus a bonus of 5 (thenumber of pins knocked down on the next roll.)A strike is when the player knocks down all 10 pins on his first try. The bonusfor that frame is the value of the next two balls rolled.In the tenth frame a player who rolls a spare or strike is allowed to roll the extraballs to complete the frame. However no more than three balls can be rolled intenth frame.
• Philip:Nurrefactorenwennalle Tests grünsind
• ### Code Kata Workshop - Improve your skills through deliberate practice

1. 1. CODE GETTING BETTER THROUGH DELIBERATE PRACTICE WORKSHOP BY MICHAEL WEGENER NAMICS AG WWW.NAMICS.COM PHILIP ALTHAUS (Kata)   形
2. 2. PROGRAMMERS ARE PROBLEM SOLVERS ”Is there more than one way to solve a certain problem?”
3. 3. YOUR BRAIN is extremely powerful when it comes to pattern recognition its main focus is on optimizing analogy retrieval
4. 4. THAT’S WHY DELIBERATE PRACTICE IS ONE OF THE BEST WAYS TO GET BETTER AT SOMETHING
5. 5. CODE KATAS EXERCICES WHICH HELP PROGRAMMERS HONE THEIR SKILLS THROUGH PRACTICE AND REPETITION do it in pairs SIMPLE PROBLEM TO SOLVE THAT GETS HARDER WITH RESTRICTIONS there is no right solution, it has not to be finished
6. 6. WHY BOTHER? LEARNING OUTSIDE THE CURRENT PROJECT experiment on a playground GETTING INSTANT FEEDBACK discuss your approaches SEE HOW OTHERS DO THE SAME THING DIFFERENT there is no right solution
7. 7. RESTRICITONS & WAYS PROBLEM TO SOLVE NO CONDITIONALS TIME TO GREEN GOOD / BAD PROGRAMMER … NO ARRAYS use polymorphism write small methods make small changes write better tests use data structures
8. 8. WORKSHOP scoring bowling
9. 9. Java Example GIT REPOSITORY git@github.com:danielkummer/namics-conference-kata-workshop.git
10. 10. GAME RULES 10 FRAMES / 2 THROWS PER FRAME 10 pins to knock down SPARE – ALL 10 PINS IN 2 THROWS bonus – no. of pins knocked down in next throw STRIKE– ALL 10 PINS IN 1 THROW bonus – no. of pins knocked down in next 2 throws 10th FRAME – ADDITIONAL BALLS ON SPARE OR STRIKE no more than 3 balls total 4  1   5   5  4   14   6   29   5   49   60   1  0   61   7   77   6   97   117   2   133   6
11. 11. REQUIREMENTS WRITE A CLASS NAMED GAME it has 2 methods ROLL(PINS : INT) CALLED EACH TIME PLAYER ROLLS A BALL argument is number of pins knocked down SCORE() CALLED AT THE END OF THE GAME returns the total score of that game Game + roll( pins : int ) + score()
12. 12. TESTS FIRST GUTTER GAME no pins where knocked down ALL ONES every throw knocked down one pin ONE SPARE game with one spare ONE STRIKE game with one strike
13. 13. WRAP UP lets review...
14. 14. CODE KATAS REUSE A SIMPLE KATA OVER AND OVER play with different restrictions USE TEST-DRIVEN-DEVELOPMENT as a supportive technique LEARN YOUR STRENGTHS AND WEAKNESSES and those of others RECOGNIZE THAT DIFFICULT TASKS WILL GET EASIER AFTER A WHILE you need to struggle in order to improve
15. 15. THE HUMAN FACTOR REVIEW Improve and learn DISCUSS guidelines solutions problems SHARE thoughts tools ideas
16. 16. THANK YOU for your attention now leave and do katas!