Format: coding demonstration
Duration: 60 minutes or 3 hours if you prefer
Abstract
"I'm not a great programmer, I'm just a good programmer with great habits" - Kent Beck.
From the guy who wrote "Smalltalk best practice patterns", invented eXtreme Programming, Test Driven Development, and JUnit, you might think this is just false modesty. But I disagree. Good habits of writing clean, easy to real code, with good automated test coverage, will get you a long way in this business. So what are you doing to cultivate your coding habits?
One thing I have found very helpful is to practice with "code kata" exercises. This is an idea introduced by Dave Thomas in his blog. He says "A kata is an exercise in karate where you repeat a form many, many times, making little improvements in each. The intent behind code kata is similar." So you sit down for an hour or two and solve a small toy coding problem, a code kata. The challenge is to follow a good coding process - use small steps, work test driven. The code should build up from nothing into an elegant, well tested design.
So in this session I will perform a code kata, using Test Driven Development to solve "KataMinesweeper" in python. By attending the session, you will be able to see the TDD process in action and ask questions about how it is done. You'll also get a chance to see some python code and learn a little about the capabilities of this powerful dynamically typed language.
Detailed description
I could do this in 60 minutes and just code the prepared kata, which is what I'm submitting. I could also do the kata in Java if you would prefer, but my python is better than my Java.
If I instead have half a day (3 hours) I could run a coding dojo, with an interactive Randori Kata too. So you could consider that. I recently did this at europython and it seemed to be pretty successful.
Suggested outline for half day session:
20 minutes - introductory presentation, background
60 minutes - prepared kata demonstration of the technique
(KataMinesweeper) (for a one hour session that is all I would do)
60 minutes - randori kata, everyone involved (KataReversi)
20 minutes - debrief, reflection.
Biography
Emily Bache is an experienced software developer and programming coach, with a preference for agile methods and Test Driven Development. Over the past decade Emily has worked in a variety of organizations from very small to very large, including many years at AstraZeneca. There she was responsible for the development of an award winning platform for computational chemistry, which was implemented in python. As well as speaking at international conferences such as XP2009, agile2008 and Scandinavian Developer Conference, Emily regularly leads Coder's Dojo meetings.
Sample material
katas.pdf
Comments (2)
Jul 30, 2009
Vasco Duarte says:
The idea of the half-day coding kata is good, but we lack the time in the confer...The idea of the half-day coding kata is good, but we lack the time in the conference. How are you planning to make the Kata work in 60 minutes? Will you "pair" with the audience and have them contribute? Will you have a partner and pair through the kata so that one does the coding and the other does the "talking" for the audience?
Aug 04, 2009
Emily Bache says:
I like to code and explain at the same time, and encourage anyone in the audienc...I like to code and explain at the same time, and encourage anyone in the audience to stop me if they no longer follow what I am doing. I would prefer to do this with a pair but I have done it without. I could ask someone from the audience to step up and pair with me, and help to force me to explain what I'm doing. Hopefully someone would be willing to do that.