Showing posts with label TDD. Show all posts
Showing posts with label TDD. Show all posts

Sunday, April 22, 2012

Roman Numerals Kata revisited

More than a year ago I wrote a post and recorded a video about the Roman Numerals Kata. To be honest I haven't been doing many katas lately but as I've had this weekend for myself, I went back and revisited the Kata, in JavaScript this time. And also recorded a video:



I am not really sure about how my coding has changed in the last year. There's no doubt that JavaScript uses a very different philosophy to Java, and I'm a lot more confident writing JavaScript now, but other than that, not much seems to have changed.

The only common pattern I see is that TDD is really helpful. In both screencasts you can see me doing something wrong (mixing up symbols last year, and forgetting to set the main function for immediate invocation this year, for instance) and only by having tests failing I realised that they were problems. It really saves you time if you don't have to deploy your code and play around with it to see what you've broken. Also, being the first user of your own code allows you to put a bit of thought in your design.

In this version I was not interested about recursion or Maps in Java, and I decided to skip the outer BDD layer (although Jasmine would allow me to do so). What was more interesting was to go through the different Module pattern incarnations in JavaScript, and using jasmine-node from the command line, although the --autotest option keeps crashing on me so I cannot use it! I am not the biggest fan of autotest utilities but for these kind of deliberate practice they are actually quite nice.

Monday, March 14, 2011

Code retreat in Winchester

I had a quite big post written about the event in Winchester but as a proof of how much I learned in the space of just one day, I went into end of session mode and deleted it!

It was an intense day but very enjoyable. For me, my first code retreat and also my first time pairing with another person in the same room. All my previous pairing experience had been remotely, and I have to say that I did enjoy sitting side by side, but I could not do a fair comparison because I had never met any of these guys before, and shouldn't compare that with the familiarity of knowing the other person, even if only remotely.

Each session was surprisingly different from the previous one, not only due to the rules, but also due to personalities and languages. I must admit that by the end of the last iteration I had already lost a part of my brain. When someone said during the last retrospective that they needed a pint, I couldn't help but think that I'd rather have a bucket full to dunk my whole head in it!

Many thanks to everyone at Eden cause the organisation was excellent, and to all the participants for making it possible. It would've been cool to see @ecomba and @sermoa in a demo session of TDD as if you meant it; I'm sure I could have learned a lot from that. Also I have some concerns about retrospectives, mainly because only the more extroverted types participate more freely. A group of more than 20 people can be frightening for some. But such is life, right?

In any case, the event certainly surpassed all my (high) expectations and I can't wait to attend another one. If anyone is interested in facilitating one in Ireland, please get in touch and I could talk to local dev groups about it.