code katas: practicing your craft

20
Code Katas Practicing Your Craft Mike Clement @mdclement [email protected] http://blog.softwareontheside.com Utah Code Camp Fall 2011

Upload: michael-clement

Post on 06-May-2015

4.480 views

Category:

Technology


2 download

DESCRIPTION

One of the key values as part of the Software Craftsmanship movement is to be "skill-centric" and as part of that, practicing our skills as software developers is key! The Code Kata format is a coding exercise that is repeated and perfected. It provides one of many ways to practice the craft of software development. We'll discuss the Code Kata format, introduce a few katas and discuss some other practice formats.

TRANSCRIPT

Page 1: Code Katas: Practicing Your Craft

Code Katas

Practicing Your CraftMike Clement@mdclement

[email protected]://blog.softwareontheside.com

Utah Code Camp Fall 2011

Page 2: Code Katas: Practicing Your Craft

“Often the true value of a thing isn’t the

thing itself, but instead is the activity that

created it.”-Dave Thomas

Page 3: Code Katas: Practicing Your Craft

Chad Fowler on Practice

“As a musician, I might spend a significant portion of my practice schedule playing things that nobody would want to listen to…. I would certainly never record them and release them on a CD. I wouldn’t even bore anyone with these sounds unless they either lived in my house and had no choice or were being paid to listen to them and offer suggestions for improvement. This is an example of “work” in which the action is far more valuable than the direct output.”

http://chadfowler.com/2003/03/25/valueless-software

Page 4: Code Katas: Practicing Your Craft
Page 5: Code Katas: Practicing Your Craft

BUT I “PRACTICE” ON THE JOB!The Lie

Page 6: Code Katas: Practicing Your Craft

Dave Thomas on Practice

“It’s like taking a group of fit kids and telling them that they have four quarters to beat the Redskins (hey, we manage by objectives, right?). 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.”

http://codekata.pragprog.com/2007/01/code_kata_backg.html

Page 7: Code Katas: Practicing Your Craft

Dave Thomas’s Keys to Practice

•Pressure Off•Learn how to play with code

http://www.codekata.com/2007/01/code_katahow_it.html

Fundamentally incompatible with “on

the job”!

Page 8: Code Katas: Practicing Your Craft

CERAMICSQuantity or Quality?

Page 9: Code Katas: Practicing Your Craft

Shu Ha Ri

• 守 Shu – House of Laws; to abide by, to defend• 破 Ha – Stone; to break• 離 Ri – Bird; to leave, to depart• Similar to Dryfus model

– Novice, Advanced Beginner, Competent, Proficient, Expert

• Similar to Apprentice model– Apprentice, Craftsman, Master

Page 10: Code Katas: Practicing Your Craft

I’M SO SMARTThe rush past 守 (Shu)

Page 11: Code Katas: Practicing Your Craft

Code Katas are Shu

Slow down!

Page 12: Code Katas: Practicing Your Craft

So what arekatas?

Page 13: Code Katas: Practicing Your Craft

KATAS AREN’T THE ONE TRUE PRACTICE?

Other forms of practice

Page 14: Code Katas: Practicing Your Craft

Randori

• Pair Programming• Pair changes with mechanism (Time box, Ping Pong)• Start from scratch• Use TDD• Everyone should be following• Pair should be explaining• Audience gives suggestions only with when Green• Example at http://vimeo.com/2499540

http://codingdojo.org/cgi-bin/wiki.pl?RandoriKata

Page 15: Code Katas: Practicing Your Craft

Koans

• Koans are questions without absolute answers which are used to break down assumptions and reveal underlying truths

• http://rubykoans.com/

Page 16: Code Katas: Practicing Your Craft

Code Retreat

• Problem: Conway's Game of Life• Length of Session: 45 minutes• Duration: 8.30am to 5 or 6pm• Pair-programming is necessary, as the knowledge transfer

contained in that activity is essential to the practice• Prefer using Test-Driven Development (TDD)• After each session, pairs should be swapped• After each session, code must be deleted, not put in a

branch, not stashed, just deleted with no trace left

http://coderetreat.com/facilitation.html

Page 17: Code Katas: Practicing Your Craft

LET’S TRY IT OUTGuided or Prepared Kata

Page 18: Code Katas: Practicing Your Craft

“Often the true value of a thing isn’t the

thing itself, but instead is the activity that

created it.”-Dave Thomas

Page 19: Code Katas: Practicing Your Craft

Kata Lists

• http://codingdojo.org/cgi-bin/wiki.pl?KataCatalogue

• http://codekata.pragprog.com/2007/01/code_kata_backg.html

• http://stackoverflow.com/questions/44533/your-favorite-code-kata

• http://www.katacasts.com/• http://katas.softwarecraftsmanship.org/