code katas: practicing your craft

Post on 06-May-2015

4.484 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

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

Code Katas

Practicing Your CraftMike Clement@mdclement

mike@softwareontheside.comhttp://blog.softwareontheside.com

Utah Code Camp Fall 2011

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

thing itself, but instead is the activity that

created it.”-Dave Thomas

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

BUT I “PRACTICE” ON THE JOB!The Lie

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

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”!

CERAMICSQuantity or Quality?

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

I’M SO SMARTThe rush past 守 (Shu)

Code Katas are Shu

Slow down!

So what arekatas?

KATAS AREN’T THE ONE TRUE PRACTICE?

Other forms of practice

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

Koans

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

• http://rubykoans.com/

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

LET’S TRY IT OUTGuided or Prepared Kata

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

thing itself, but instead is the activity that

created it.”-Dave Thomas

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/

My Contact Info

• @mdclement• mike@softwareontheside.com• http://blog.softwareontheside.com• Utah Software Craftsmanship Group– https://groups.google.com/forum/#!

forum/ut-software-craftsmanship– @utahsc

top related