December 24, 2009 3

String Calculator – Scala

By Corey Haines in Katas

Continuing our series of ’same kata, different languages,’ Giordano Scalzo provides us with a great view of the kata in Scala. I’ve fooled around a little bit with Scala, but definitely felt like I was just writing java in a not-quite-different environment. Watching Giordano code was very refreshing.

Giordano Scalzo is a Software “jack of all trades, master of none” living in Milan (Italy). He does Software for fun since early ’80s and he’s paid for it since 1997. Got interested in Agile stuff in 2000 and, since then, he tries to follow the principles in everything he do. In the last years moved toward the management part of the develompment, still embrancing all Agile values and spreading them between all people he works with.

Here’s Giordano’s description:

I admit it: do this kata has been an hard challenge; this is the longest Scala program I ever wrote and this is the first Kata I did with objectives: the first was to performe live at Milan Xpug meeting, and the second was to record it in a smooth way. Two different practices that gave me a lot feedback and self consciousness about the way I write code.
Many thanks to Gabriele Lana which arranged an exciting Kata evening at Milan Xpug and to Corey which host me on http://www.katacasts.com.
I’d love to receive any kind of suggestions, about the solution I got and the process I used to reach it.
I think Software Craftsmanship is the most exciting movement in Software Development since the times of Agile Manifesto, and the katas are a wonderful way to sharp our skills.
Finally, I hope you’ll enjoy my performance.

I definitely enjoyed it!

Enjoy! And, as usual, feel free to comment. If you are inspired to do your own kata, please let me know; I’d love to work with you on it.

KataCast: StringCalculator in Scala from giordano scalzo on Vimeo.

3 Responses to “String Calculator – Scala”

  1. Hi Corey,

    It was really interesting to see all the different variations on this kata in different languages. Thanks for posting them and to the folks who contributed them.

    I would like to offer my effort up for the blog. You can find it and my description of how I came to it here: http://www.iamnotmyself.com/2009/10/23/TDDKataCalculatorDemonstration.aspx

  2. James Martin says:

    There was a great use of some syntactical scala sugar in the refactoring at the 1,2,3 = 6 test case. Guess I’ll need to really brush up on the language. Magic!

    Thanks for posting; really enjoyed it!

Leave a Reply