Gilded Rose Kata

As part of our Week 3 assignments for my Craft of Software Development course, we had to do the Gilded Rose kata (http://craftsmanship.sv.cmu.edu/posts/gilded-rose-kata). Even though we had already done it last week, this time we had to do it 2 more times to take some of the feedback we got into account and use the experience we got from the first run.

It was interesting yet somewhat tedious the 3rd time. I had initially rewritten the whole code to be DRYer and more readable but this time around I just added functionality without modifying the original code. This made me feel uneasy since the original code SUCKS and I honestly didn’t trust it. To add to the discomfort, I decided not to write test cases for the original code this time around. This resulted in what might be buggy code. My part works as expected (my tests say so) but I can’t necessarily say the same for the rest.

For the third time I did pretty much the same thing I did in Run #2 but this time I wrote tests for the original code. This made me trust it more even though some of the tests cases that originated from the specifications didn’t pass with the original code. My decision was to just assume the code was correct and that there were some changes in requirements that weren’t reflected on what might be outdated specs. The tests took some time but it made me trust the whole code a lot more.

All right, that’s pretty much it for now. I’ll be back in a couple days with more :)

Bye,

Kris

Leave a Comment


5 + five =

Social Widgets powered by AB-WebLog.com.