Sunday, May 31, 2015

Interesting Talk: "Red, Green, ... now what ?!"

I've just watched this wonderful practical demonstration of using connascence to guide the refactoring step of TDD by James Jeffries and Kevin Rutherford: These are the slides.

These other slides explain more about each type of connascence.

Friday, May 29, 2015

Wednesday, May 20, 2015

Exercism: "Queen Attack in Clojure"

I solved the Queen Attack problem in Clojure.

This is my solution:

I think that the can-attack function should be called can-attack?. I've kept its original name because it's being exercised from the tests given by Exercism.

You can nitpick the solution here and/or see all the exercises I've done so far in this repository.

Exercism: "Robot Simulator in Clojure"

I solved the Robot Simulator problem in Clojure.

This is my solution:

I think that the turn-right and turn-left functions aren't necessary. I've kept them because they are being exercised from the tests given by Exercism.

You can nitpick the solution here and/or see all the exercises I've done so far in this repository.

Tuesday, May 19, 2015

Exercism: "Kindergarten Garden in Clojure"

I solved the Kindergarten Garden problem in Clojure.

This is my solution:

You can nitpick this solution here and/or see all the exercises I've done so far in this repository.

Saturday, May 16, 2015

Exercism: "Crypto Square in Clojure"

I solved the Crypto Square problem in Clojure.

This is my solution:

You can nitpick this solution here or see all the exercises I've done so far in this repository.

Wednesday, May 13, 2015

Exercism: "Bank Account in Clojure"

In the last event of Clojure Developers Barcelona, we practiced mob programming to solve the Bank Account problem in Clojure.

This is our solution:

You can nitpick our solution here or see all the exercises I've done so far in this repository.

Monday, May 11, 2015

Friday, May 8, 2015

Interesting Panel: "TDD and Software Design"

I've just watched this wonderful discussion between Sandro Mancuso and J. B. Rainsberger about the relationship between TDD and Software Design which was organized by Carlos Blé:

Tuesday, May 5, 2015

Kata: String Calculator in Clojure

Last week we started working on the String Calculator kata at the Clojure Developers Barcelona meetup.

Finally, this week I found some time to finish it.

These are the tests using Midje:

The resulting code which is divided in several name spaces.

The string-calculator.core name space:

The string-calculator.numbers-parser which is where most of the logic lives:

The string-calculator.numbers-validation name space:

Finally, the string-calculator.numbers-filter name space:

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

To document the process I committed the code after every passing test and every refactoring.

This time I didn't commit the REPL history because I used Cursive and I didn't find how to save it. Apart from that, I really enjoyed the experience of using Cursive.

You can find the commits step by step here and the code in this repository in GitHub.