viernes, 19 de junio de 2015

Some conclusions about mentoring TDD

Today I finished the first round of katas to try TDD among all members of the software engineering team I'm part of.

I learned quite a lot from them and the best part of it was that they seem enthusiastic to incorporate TDD in their next developments. Features like thinking about tiny steps, pair programming have made have taught them another way to do better software and faster.

Some of them have seen the benefits of not doing overengineering.  Some others have seen the importance of refactoring, though there is a lack of refactoring practice which I'm quite confident to solve with katas.

My intention is to keep doing katas all the time and hope the team start doing the same. I mean, they have seen themselves the benefits of the katas.

There is still a long way to accomplish my goal which is to transform the way software is being done here at the Mexican Stock Exchange. It's such a good start. I just can promise to try hard, learn, share and mentor whenever I can.

Finally, should I mention an analogy for doing katas I would say that is like football players, in fact any sportsman, you have to train before performing your activity. In doing software it is the same, we must train before performing, though we play a match everyday not twice a week like a football player.

martes, 9 de junio de 2015

Teaching TDD

I decided to show/teach/encourage to try TDD with my colleagues at work. A few of my colleagues and I had some katas before. They were quite successful and particularly 2 of them sounded quite excited.

On my way to invite more people to try TDD, last night a colleague of mine and I had a kata, the wordwrap kata. Unfortunately it was not as good as the previous ones.

We started typing a test, then make the class and the method. Everything compiled and got the red bar! We went green and started adding more tests, red bar turning into green for about 6 times. Then we decided to add a more complex test, which was supposed to be the final test.

During this final test we struggled  quite a lot and couldn't get the green bar. On the opposite we ruined two tests. That was quite frustrating, it was like 8:20 pm and decided to continue today.

On my way home, riding my bike I was still thinking how it could have failed. I had done that kata before a few times but this was totally different. I started analyzing our kata and thought that our main mistake was to refactor too lately, perhaps. When we decided to implement the last test, our code was too complex.

Maybe we were tired and couldn't think about refactoring instead of forcing it to turn green.

Today we refactored what we needed and happily turned green. Several lessons learned during this kata. Perhaps the most important is to have a bottle of water next to the keyboard to force us stop for a while and try to rethink what we were doing!