Archive for March, 2011

XP2011 keynote abstract

I’ll be giving one of the keynotes at XP2011 (Madrid, May 10-13). Here’s my tentative abstract. How do you like it?

What Forms of Work-and-Life Make Sense for Us?

It’s widely agreed that Agile has “crossed the chasm” to mainstream acceptance. Along the way, some of the more interesting bits have fallen off. This talk will be the latest in a multi-year effort to recover those bits, rehabilitate them, make them stranger, and encourage you to put them to work. There will be no overarching “Big Idea”, but some smaller ideas will include the distinction between what I call “the stance of rationality” and “the stance of reaction” (I favor the latter), the high cost of thinking, the virtues of habit, and some criticism of the optimistic ideas about teams, enterprises, and leaders that infest our field. There may also be a tango lesson.

Monad tutorial, Part 4

The State monad is a big jump for the monad-learner. It jumps up a level of abstraction by using functions as values. That makes it confusing because you have functions that work on functions, and it can be hard to keep track of whether a particular function is a this-kind-of-function or a that-kind-of-function. I try to tease apart the Gordian Knot thusly:

  1. I start by creating a logging monad that simply logs the value of each step. This is fairly straightforward.

  2. Next, I decide I want only particular steps to be logged. Steps to be logged use a log function which returns either a plain value or a wrapped value. That leads to an if statement in the “decider”.

  3. Then I raise the question: can we get rid of the if statement by pushing its work down into the log function? In this section of the tutorial, I do something like follow Beck’s rules of design: make a series of undirected local changes that arrive at something globally coherent. Specifically, that first simple decision of pushing work into one place forces us to implement the full State monad (though I only show it used for building a log).

  4. Finally, I use that solution to illustrate some key concepts: base values, monadic functions, monadic values, and how they’re put together to make up a monad.

I have my doubts about how well this works, particularly the 3d step. I’d value your opinion.

Monad tutorial, part 3

How the sequence monad works. The need for a “patcher” function to fix up results of the last function called by a chain of deciders. A better description of a monad: a decider and a patcher.

Madison 2011, Honiton 1766

[Update: I accidentally published my first draft of this.]

I’m reading that part of E.P. Thompson’s The Making of the English Working Class that’s about what happened before the industrial revolution. I’ve been struck by the food “riots” that were common until the 1840’s. I put “riots” in scare quotes because they were often (usually?) peaceful. Here, Thompson quotes John Wesley:

[The mob] had been in motion all day; but their business was only with the forestallers of the market, who had bought up all the corn far and near, to starve the poor, and load a Dutch ship, which lay at the quay; but the mob brought it all out into the market, and sold it for the owners at the common price. And this they did with all the calmness and composure imaginable, and without striking or hurting anyone. (p. 64)

Thompson gives another example:

In Honiton in 1766 lace-workers seized corn on the premises of the farmers, took it to market themselves, sold it, and returned the money and even the sacks back to the farmers. (p. 64)

Oddly similar to events in Madison, where most reports of the scene in the capital were of a surprisingly self-organizing, calm, and disciplined crowd.

What was the motivation for the bread riots? They were “legitimised by the assumptions of an older moral economy, which taught the immorality of any unfair method of forcing up the price of provisions by profiteering on the necessities of the people” (p. 65). Thompson also singles out the tradition of the free-born Englishman, which consisted of:

[…] a moral consensus in which authority at times shared, and of which at all times it was bound to take into account […] this question of the limits beyond which the Englishman was not prepared to be “pushed around,” and the limits beyond which authority did not dare to go, is crucial to an understanding of this period. The stance of the common Englishman was not so much democratic, in any positive sense, as anti-absolutist […] [The unwritten consensus stemming from the Glorious Revolution] might provide the propertied classes with a sanction for the most bloody code penalising offenders against property; but it provided no sanction for arbitrary authority. (pp. 79-80)

That resonates with me. I’m a comfortable white middle-class American. I have certain expectations that those with power will be… tactful. They won’t be absolutist (toward me). They won’t be arbitrary (toward me). They won’t nakedly use a crisis as an excuse to cut off their political enemies’ funding. They won’t be radical. Gov. Walker is radical in the same way that many Republicans have recently been, but their targets have been, well, poor people, brown people, people imprudent in their mortgage borrowing—people Not Much Like Me. Walker’s targets are (much more explicitly) teachers, middle-class workers, firefighters, policemen—people that are like me, not “others”.

That’s why I feel in my gut he’s gone too far. (My head thought all his sort had gone too far long ago.) That’s why I think many whitebread people like me feel he’s gone too far. We finally realize: there really is no social contract left that stops us from being next.

Monad tutorial, part 2

Building on the foundation of the Identity Decider from Part 1, I first introduce some notation to make a monadic computation look more like a `let`. Then I explain the Maybe monad and what it tells us about how monads are meant to be used. Finally, I show what the Sequence monad does as a teaser for Part 3.

Part 1 of a tutorial on monads

I’ve read or watched several tutorials on monads, and they left me confused. Thinking about why that was, I decided they emphasized a rather uninformative terminology too soon and obscured core ideas with surface syntax. So, following in the footsteps of countless others, I decided to teach monads right (dammit!). I’ve produced part 1 of a tutorial that ignores terminology and uses pictures to avoid the distractions of surface syntax. I’d like you to tell me if the approach is promising. If so, I’ll continue.

Monad Tutorial, Part 1 (Monads as Deciders / Identity Monad)


The tutorial assumes you know some Lisp. I use Clojure for examples.