The long way through Software Craftsmanship

Coding dojo: Palindromes

Aug 19, 2015 - 1 minute read - Comments - clientcoding-dojojavapalindromefacilitationfacilitator

At a client, today I’ve facilitated a coding dojo on palindrome searching. I’ve prepared a github repository for the java solutions. In this repository, the tag start-here has the prepared pom with dependencies. We have paired to work on the kata but none of my teammate’s solutions are available (at the moment), but mine is at the master branch.

Searching on a suite of failing tests

Aug 13, 2015 - 5 minute read - Comments - tipsearchnaive-searchbinary-searchdichotomous-searchcomparisonspringcontextend-to-end-testtest-dependencyantipattern

Motivation Today, at a client, in the green phase, we had a test suite which was failing: the whole suite fails but the test cases, individually, succeed. So my first impression was that something was being shared between tests. Also confirmed because the failing class was an EndToEnd test, in which we load the whole spring context A quick glance was not revealing anything interesting, so I decided to find which is the minimum suite (as opposed as to the whole suite) that makes the new testcase fail, expecting to narrow the search for possible causes.

The Animal Laborans and the Homo Faber

Aug 10, 2015 - 2 minute read - Comments - the-craftsmanrichard-sennettphilosophyhannah-arendtquoteanimal-laboranshomo-faber

I’ve found this quote very interesting from the book “The Craftsman”, by Richard Sennett: Animal laborans is, as the name implies, the human being akin to a beast of burden, a drudge condemned to routine. Arendt enriched this image by imagining him or her absorbed in a task that shuts out the world, a state well exemplified by Oppenheimer’s feeling that the atomic bomb was a “sweet” problem, or Eichmann’s obsession with making the gas chambers efficient.

The language was prepared for that

Aug 10, 2015 - 2 minute read - Comments - clojurehaskelljavalanguage-comparisonprefix-notationoperatoroverloading

Many times I’ve written this function: public boolean between(int lowerBound, int n, int upperBound){ return lowerBound <= n && n <= upperBound; } It may depend on the case, whether it is [], [), (] or (), to use mathematical terms. When the two comparisons are the same ([] and ()), there is duplication in the comparisons. Investigating a little bit on this in clojure, I’ve found this function: