Saturday, February 28, 2015

Scala Developers Barcelona TDD introduction session

Two weeks ago I facilitated an introduction to TDD in a Scala Developers Barcelona event.

First, I gave a very short introductory talk about TDD, (these are the slides).

After the talk, I coded a simple exercise to help the attendants get a feeling of the TDD flow.
I tried to stress the importance of creating a list of examples first and choosing the next test so that the code could grow in small steps. I also talked about wishful programming, going from red to green quickly and the importance of refactoring to sustainable TDD.

I used Clojure to code the exercise.

I feel that, somehow, using Clojure got in the way of the message I wanted to transmit. Next time I'll use a language which is more familiar to all the attendants.

This is my solution to the exercise in Clojure where you'll find commits after each passing test and each refactoring, so you can follow the process.

Finally, we started doing TDD with a simple kata.

Ignasi, Jordi and I were all the time visiting the different pairs, helping with doubts about TDD or Scala and commenting with them how their solutions were growing test after test.

I think that during this time I had the chance to clarify some things that hadn't come across before because of the lack of familiarity with Clojure.

At the end, we had a short debate about TDD.

I'd like to thank the Scala Developers Barcelona organizers for inviting me to facilitate this dojo. I had a great time and I hope that, the attendants could get something useful from it in spite of my using Clojure for the first example.

I'd like to also thank all the attendants for coming and Álvaro for telling the Scala Developers Barcelona organizers about me.

No comments:

Post a Comment