In my last post I described the fluent calculator kata which we came up with for our coding dojo. When we started implementing the kata we decided to modify the initial set of “requirements” slightly in order to make it a bit more complex. Here is the changed requirement: The calculator should never throw exceptions. When an overflow occurs the calculator should throw an InvalidOperationException with an inner ArithmeticException. I’ll show you what design and tests we came...
The fluent calculator kata
We are currently preparing for the next coding dojo in our team. A team mate and I came up with a nice kata which we are going to try out today. We didn’t check if there is already such a kata available on the internet. So please take no offense if you already came up with a similar solution 😉 All input values should be int. The calculator should never throw exceptions. The api should guide through the fluent interface, i.e. after the calc method you are never again able to call the calc...
Mocking Kata – Copier (.NET)
To continue my series on Mocking Katas (see Mocking Kata – Instrument Processor for the last Kata), I’ll show you a very simple Kata that I normally use in my Test Driven Development training courses to introduce mocks (created manually or dynamically with the use of a mocking framework): the CharacterCopier.
Mocking Kata – Instrument Processor (.NET)
We use Coding Katas in Coding Dojos to improve our programming skills. This includes skills in software design, refactoring, Test Driven Development, Mocking, tool usage and a lot of other tiny stuff. However, I found only a few Katas, especially Katas including the need for mocks (see for example ). Most Katas are very algorithmic, which is good for learning TDD. But its bad for learning how to use mocks. Therefore, I started to invent my own Mocking Katas. I use these in my training courses...