Tuesday, August 2, 2016

Interesting Paper: "'Claro!': An Essay on Discursive Machismo"

I've just read this wonderful paper by Diego Gambetta this great paper talks about how "Claro!" attitudes in communication, "characterized by strong opinions on everything from the outset of discussion", and the set of beliefs about knowledge behind them can make impossible to get to positive results in group deliberative processes.

A very interesting concept I got to know through Ignacio Sánchez-Cuenca's La desfachatez intelectual. Escritores e intelectuales ante la política book.

Unfortunately, "Claro!" attitudes are widespread in our culture...

Interesting Talk: "Doing data science with Clojure: the ugly, the sad, the joyful,"

I've just watched this interesting talk by Simon Belak

Thursday, July 28, 2016

Revisited Kata: Using Midje's defrecord-openly to mock a protocol in Ohce

Several weeks ago I did the Ohce kata in Clojure using outside-in TDD with Midje (as I explained in a previous post).

In that post I said that I hadn't used Midje's defrecord-openly and provided macros and had instead decided to write my own code to capture the arguments with which the functions of the Notifier protocol implementation were being called because:
... I didn't like having to use defrecord-openly in production code.
Well, I was wrong!

It turns out that it is not necessary at all to use defrecord-openly in your production code in order to mock a protocol.

I understood it thanks to this answer in Stak Overflow: Mocking Clojure protocols.

The only thing I needed to do was to use defrecord-openly to create a fake implementation of the Notifier protocol inside the test code like this:

and then write the tests against this unimplemented fake.

This are the new Ohce tests:

As you can see it's very easy to use Midje's defrecord-openly to mock protocols.

I just misunderstood Midje's documentation the first time I tried to do it...

Friday, July 22, 2016

Interesting Paper: "Why should physicists study history?"

I've just read this wonderful paper by Matthew Stanley This is a gem full of wonderful ideas about diversity, group dynamics, critical thinking and the pursue of knowledge that I think are also valuable to software development and, probably, to any team or community effort.