DCSIMG
Prime Factors Kata - Uri Lavi

Prime Factors Kata

One of the key aspects of a Software Craftsmanship is constant practice.
Kata (from Martial Arts) is one form of such practice. The notion of a Code Kata was first introduced by Dave Thomas and can be viewed as:

  • Practice of the same methods, solutions and activities to a perfection.
  • Practice of the same problem, tackling it each time from a different angle or with a different solution.

Solving a known problem multiple times utilizing the same methods, enhances the understanding of the specific steps; It especially enhances the understanding of unit tests, refactoring steps or "Design" approaches. Moreover, striving to do better each time motivates one to learn the keyboard shortcuts and IDE commands in order to perform smoothly. Knowing the tools of the trade (or the tools of the Martial Arts :) ) is essential for the Software Craftsman's success.

Solving a problem in different methods helps to identify solutions that work better in the right context (requirements).

Below (also here) is one of my Prime Factors Kata's sessions recorded late at night :).
The Kata demonstrates finding a number's prime factors using TDD (C#, NUnit, VS 2008).
(Don't forget to turn on the speakers)

I must admit, that it is super difficult to record a completely clean demonstration, especially while synchronizing the music and the moves.
Moreover, one of the real obstacles is statically typed languages (C#) that slow a bit the moves. Exercising the Kata with dynamically typed languages can ease and speed the performance.

Published Sunday, March 07, 2010 1:04 AM by Uri Lavi

Comments

# Refactoring Tools Review - part II

Oh, my God! I am definitely in love! I finally had the time to play with the latest DevExpress 's

Thursday, March 11, 2010 11:41 PM by Uri Lavi

# Short Roman Numeral Kata

For our second Software Craftsmanship Coding Dojo , I have prepared a "Short Roman Numeral"

Monday, August 16, 2010 9:13 AM by Uri Lavi

# Short Roman Numeral Kata

For our second Software Craftsmanship Coding Dojo , I have prepared a "Short Roman Numeral"

Tuesday, August 17, 2010 10:42 AM by Uri Lavi

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: