Dec 23 2009

What I learned doing a Katacast

Category: me,presentationgiordano scalzo @ 10:32 am

As said before, last week at Milan Xpug meeting, we organized a kata evening, with the same challenge done with different language.
During the practice to reach a quite well solution, I publicized my attempts through Twiiter gaining attention from Corey Haines hinself who asked me if I was interested to appear on as a guest: wow, I felt like a teenage U2 fan who, while playing in garage, receive a call from The Edge asked him if interest to play some concerts with them!

Anyway, I tried to record a good enough kata, that means without compilation error, in resonable time and typed in smooth way.
That could sound as a straightforward thing to do (I thought it that way), but I invite everyone tho give it a try: I did almost 10 complete recording, not counting all false starts or big mistakes near the end of kata.
I noticed how often I did errors in first steps, I think while I’m not into the “flow”, or at the end, when I start to relax.

Anyway, the only way to perform a Kata in a acceptable time for (less than 15 minutes) is to master the editor of choice.
I use vim for kata, but I’m far to be ‘fluent’ on it! Anyway, to save precious time, I learned a few usefu thricks.

First of all, we need to forget to navigate the text throught 'hjkl' or arrows keys, and use the line numbers features of vim.
With this command:

:set number

every line will appear with its number.
Almost every command of vim should be applied to a range of rows.
For example with this:

:20,30 co 35

we copy the block from line 20 to line 30 to line 35.
Or with this:


we change word java with scala in previous code.
A little variant is

:20,30 co .

that copies the block at the current cursor position.

Anyway, you can enjoy these and other basic vim tricks in my Katacast:

KataCast: StringCalculator in Scala from giordano scalzo on Vimeo.

Technorati Tags: , ,

Tags: , ,

Dec 17 2009

StringCalculator Kata at Xpug

Category: agile,bddgiordano scalzo @ 2:18 pm

Last evening the wonderful Xpug Milano hosted a Kata Meeting: three people, three language, one problem, one pomodoro each!

After the launch of, this kind of practice has begun to spread around the world.

As far as I know, that was one of the firsts meeting held in Italy and it has been exciting (and a little scaring) to be one of the performer.

The simple problem to solve was the StringCalculator kata, proposed by Roy Osherove as simple exercise to repeat to assimilate Tdd.

Luca Marrocco performed the kata in Ruby, Raffaele Salmaso a Python version, the benevolent dictator of Xpug Milano a backup kata in Erlang, and yours truly a Scala version.

Below the live recording of my session, with errors, mistakes and pauses made during the execution:

StringCalculator in Scala Kata live at Xpug Milano from giordano scalzo on Vimeo.

Any kind of suggestion about the solution, the process, the way I performed are absolutely welcome.

Technorati Tags: , ,

Tags: , ,