Friday, January 29, 2016

Kata: Alphabet Cipher in Clojure

I just redid the Alphabet Cipher kata from the fantastic Carine Meier's Living Clojure book.

I had done it some time ago with Eloi Poch and Rafa Gómez (thanks guys I had a great time) at a Clojure Developers Barcelona event.

These are the tests using Midje:

and this is the final code:

I used a mix of TDD and REPL-driven development committing after each green and each refactoring.
What I did was tinkering in the REPL to get rough versions of encode, decode and decipher functions. This kind of tinkering is getting more and more fun, the more I get used to working in the REPL.
Once I had the rough version I just copied it directly on the code, stabilized it with some tests and started to refactor it until it seemed a bit more readable to me.

See all the commits here if you want to follow the process.

You can find all the code on GitHub.

Tuesday, January 26, 2016

Interesting Podcast: "Ruby Antipatterns"

I've just listened to this great Ruby Rogues podcast talking about antipatterns in Ruby:

Saturday, January 16, 2016

Interesting Paper: "The Humble Dialog Box"

I've just read this great paper by Michael Feathers: It describes a design technique to facilitate testing of GUIs, which is also described by Martin Fowler in Humble View.