Sunday, February 1, 2009

Corey Haines and Code Katas

Surrounded by the smell of burnt popcorn and listening to the video Road Thoughts - Practice : 'Doing it right' vs 'Getting it done' really drove home some thoughts.

Do Katas. Do the same problems over and over again. Apply different techniques and approaches. Some quotes from the video:
  • "don't wait for those things to be ingrained..." over time.
  • Practice. "1 hour a day; as much as you can."
  • "Write small problems or solutions to a problem."
Practicing is essential. Practicing effectively is the goal. Practicing efficiently is a challenge.

For a Refactoring kata, what may work for you is setting up some code that needs to be refactored along with the needed JUnit Tests. Once at a satisfactory level of refactoring, you can blow away the refactored solution and refactor again from the start. Where to store such an exercise or Refactoring starting point?

I have given some thought to creating a Java project using Google's Project Hosting that contains things to practice on. I could apply the following labels to the project; label:Java label:kata. There are a couple projects in there now with those labels. I even see a "java-katas" project, but it is currently void of code.

Another thing to think about is practicing with a framework such as Struts2. Perhaps another project could be created which has the labels of Java, kata, struts2.

If Maven 2 is gaining enough popularity, maybe an even better solution is to create Maven archetypes which contain everything you need to practice particular things. Imagine creating a temporary project that is based off a starter template/archetype. Everything you need is downloaded automatically and you're ready to practice.

Well, good luck to you in your quest to practice. Time for me to practice and eat more carefully prepared popcorn.

Update! (March 15, 2009) -  http://code.google.com/p/funkata/ now exists.