Friday, February 13, 2009

Robert C. Martin On Craft

We invited "UncleBob" Martin to GLSEC last year, to give his talk on Ethics and Craftsmanship as the opening keynote.


If you missed it, well, you missed out. However, Bob recently gave the talk at JAOO and it was recorded; you can watch the video right now on infoq.com for free. Enjoy.

Wednesday, February 11, 2009

Outliers - III

Last Month I mentioned the great body of literature on airline crashes and how they happen. The problems are similar to ones we experience in business: The project is late, the staff is working too hard and taking shortcuts - management applies pressure, and a series of not-that-bad-by-themselves mistakes builds up until, eventually, you get a crash.

What's interesting is that the pilot is not working in isolation. On any commercial flight, the pilot will have someone qualified, albeit junior, sitting next to him - the co-pilot. What the co-pilot is responsible for, exactly, is a matter of philosophy. Some people view the co-pilot as sort of a double-checker; others view him as merely a body-double to fly the plane in case the pilot is somehow incapacitated. In the US, we typically go for the former, and it turns out this distinction is extremely important.

You see (obviously), when you have someone actively engaged in checking your work, few errors get through. We see this in software development, too, we call it "pair programming."

Notice I said that the pilot is junior. Now the issue of culture really begins to set in, because some cultures insist on deference from juniors.

So how can you, as a junior, express deference, but also point out that the pilot is making a mistake, that we are about to fly into a rainstorm and that our radar is on the fritz?

It turns out you use something called mitigating speech. In outliers, Gladwell uses the example of your boss asking you to do something over the weekend, verses your asking him.

In some places in North America, your boss might just swing by your cubical at 4:30PM on Friday and say "I need this on my desk monday morning." But if the tables were turned -- if you needed him to approve some document and send an email, you'd say "hey, boss, if it isn't too much trouble, could you take a look at this over the weekend and email your approval? That'd be great."

You're using mitigated speech. Gladwell lists six different levels of speech, from Command ("Deviate thirty degrees right") to Obligation ("I think we need to turn right") to suggestion ("maybe we should turn right") to query ("which direction would you like to deviate?) to preference and finally, to hint: "That return at twenty-five miles looks mean."

Yet, to the casual listener, mitigated and "no big deal" sound exactly the same.

So you try really really really hard to express deference "hey boss, could you please maybe think about" - in the hope that you'll be a team player - and nothing happens. Nothing changes. The boss thought it was no big deal.

This is especially problematic in high-ceremony cultures, where the decision has already been made behind closed doors. The boss would lose face to change the policy, and, besides, Joe's a team player - it's no big deal.

Until you run into the broad side of the mountain.

This isn't just speculation; countries that have a strong culture of deference have, historically, had a great many more aircraft accidents. On the order of seven times as many.

In avionics circles, the solution is something called "Crew Resource Management", which Gladwell explains is designed to give the crew the skills to communicate assertively, including specific ways to escalate if the boss isn't getting the hint. The fundamental assumption in Crew Resources Management is that we are going to make mistakes, and need to be vigilant to check and correct each other.

The basic escalation pattern is:
"Captain, I'm concerned about"
"Captain, I am uncomfortable with"
"Captain, I believe the situation is unsafe."

Before you weigh in on a subject, ask yourself how your mitigating language could be mis-understood as "no big deal." And, if it's an ethical or moral issue and the other person isn't getting it, consider escalation language.

It might not make you friends, but you might just avoid the cliff.

Monday, February 2, 2009

What is elegant code?

David Starr recently interviewed me for his podcast, "Elegant Code", and just put the interview up on the web today. The audio quality is a little choppy in parts, but I'm more interested in your feedback on the quality of the ideas.

You can download the MP3 directly here.