Wednesday, March 28, 2012

Gilded Rose Kata

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

  • I had an instance of not following do not repeat yourself (DRY) principles through copy-pasting because I wanted to see where to add functionality for degrading quality of "Conjured"items. I ended up pulling the duplicate code out into a function.
  • I saw a lot of duplicate code within the kata and was wondering whether to refactor or rewrite from scratch. Because I was burned out from using test-driven development (TDD), I decided that I will simply make minor corrections and use DRY for any changes that I make.
  • I performed a lot of copy-pasting during TDD, but learned that it is ok to do so: "DAMP not DRY" is the rule for test cases. DAMP stands for "Descriptive And Meaningful Phrases".

No comments:

Post a Comment