These were explored and completed in Prolog for fun. This was not TDD.
This was completed in Ruby using TDD with RSpec.
After watching a lecture on TDD it all clicked for me. With test-first development, all code is tested and unnecessary features aren’t implemented.
Previously I would do mostly regression tests, this kata was the first time I followed a rigid TDD cycle. I found myself wanting to make the Product class be a stateless function over time, but that was really more than the problem asked for. TDD helped me focus on what was important and implement those features as simply as possible.
I saved the most fun looking one for last. This was completed with Scala, a language I’m still learning. I used used rigid TDD like in Red Pencil, only implementing features after a test fails.
Another benefit of TDD became apparent, one always knows what to do next by following the failing tests. I’m sure using TDD more will help increase my productivity by keeping me focused and busy.