Tuesday, April 3, 2012

A Revisit of the Gilded Rose Kata

Today, I have completed the Gilded Rose Kata for the second time. Below are my notes:

  • I attempted to find the perfect balance between DAMP and DRY principles when writing the test cases. This balance allowed me to avoid writing repetitive code, while keeping the test cases easy to read. I went ahead with descriptive test case function headers, but kept the bodies of the test functions simple.
  • This time, I assumed that the code that has been written should be left alone and unaltered. If the case was otherwise, the customer would have asked for bug fixes in addition to the implementation of the update.
  • When I revisit the kata in the future, I plan to refactor the updateQuality() method in order to gain benefits outside of learning TDD principles.

To revisit my notes for my first attempt at the Gilded Rose Kate, please visit a previous blog entry.

P.S. I would have to say that my level of self-awareness of copying code is II. Please see what the levels mean in my learning plan.

No comments:

Post a Comment