Saturday, June 14, 2014

Kata: Berlin Clock in Clojure with Midje

I did the Berlin Clock kata in Clojure using Midje.

These are the tests:


And this is the final version of the code:


I used a mix of TDD and REPL-driven development.

To document the process I commited the code after every passing test and every refactor.
I also commited the .lein-repl-history file so that you can see all the micro-tests I did on the REPL to create some of the features and learn about Clojure including many beginner mistakes :)

You can find the resulting code in this GitHub repository.

No comments:

Post a Comment