27 August 2011

September's Bay Area TDD Course is Not Just for C# Developers

I'm holding a public Essential Test-Driven Development course at the end of September, through Agile Learning Labs. Chris Sims and I separated this one, and another in December, by programming language: September's is in C#, and December's is in Java.

I've held a number of "multilingual" public TDD courses in the past, and they tend to go very well for everyone. The languages are similar enough, and I always carry the coding samples for all the available course languages.*

The techniques, exercises, and tools are so similar that people can transition back and forth between Java and C# quite easily. Often lab partners will pair up with others using a different IDE or language, in order to get a taste for those environments. There may not be any better way to learn a language than to explore its capabilities using a lightweight testing framework and a Test-Driven approach.

Also, I've noticed repeatedly since first trying out TDD in 1998 that the selection of language or IDE is not the limiting constraint when using Test-Driven Development to build high-quality, high-value software.

So if you're a Java developer who would really rather take the September course, or a C# developer who prefers the December schedule, don't hesitate. You won't be slowing anyone down, and you won't be hindered by much. There's a chance you'll be spending part of the time pair-programming on an IDE that you're not familiar with, but you and your lab partner can switch IDEs on another exercise.


You can use discount code RobReferral at either course for an additional $300 off. I hope to see you there!

(* Essential Test-Driven Development can be provided in C++, C#, Java, or VisualBasic.Net. In the C++ and VB.Net TDD courses, I cover language-specific idioms and techniques. If you are primarily a C++ or VB.Net developer, let us know of your interest and we'll give you some options to attend a course in the programming language of your choice.)

04 August 2011

Lessons from the Pasture: Leadership and Systems Theory from Surprising Sources

The Word Problem

Imagine you're leading a diverse group of people on a nature walk. The pace is supposed to be slow enough for everyone to enjoy the walk, including the elderly and out-of-shape. Easy, right?

Let's throw in one unusual limitation: No one can talk to each other. You're on--let's say--a mostly-silent intensive five-day meditation retreat on a gigantic farm/wildlife preserve. During this walk, as the leader, you're not really required to (and perhaps not really supposed to) look back and check on the group. There's a person in the very back who will make sure no one wanders off. (I know, it's completely weird and contrived, like most word problems.)

Still easy? Of course! Just walk slowly. Easy as breathing.

And yet, I was recently in this very situation, and failed. Twice!


A loud whistle from someone in the group stopped me. I looked back and the teacher was jogging to the front of the line. "You are walking much too fast," she took up position to my left and started walking, slowly, and talking to me with her famously friendly, nonjudgmental, matter-of-fact tone: "Always consider the whole group."

"Sorry..." I said, taking momentary liberty with my vow of silence, and smiled reassuringly. She stayed long enough to set the right pace, then dropped back to the back of the line.

At 6'2", I'm much taller than most of the people in the group. Longer stride... Yes, that was it.

Plus I was hoping to taking them in the direction I had scouted out earlier that day: A beautiful walk down a straight road lined with very tall Eucalyptus trees, then through a gate onto a public trail that passed right through a functioning pasture. No fences between us and the cows. (And, I observed, no bull.) On to another road where a large old tree had recently fallen and blocked the road, and that would be where we'd turn back.

Oh, the experiences we would have had as a group, if only we were walking as quickly as I had been when I first explored this path: Seeing the cows close up, without boundaries... Mindfully dodging cow-pies... Turning a corner to see the poetic impermanence of a fallen tree...

"You're going too fast again!" Where did she come from?! Then, more quietly, she told me a few things I thought I already knew.

Stepping In It

Through the rest of the walk out to the middle of the pasture, I walked slowly enough. Then I circled back silently and everyone silently followed. As I passed each of my friends I felt my face flush with embarrassment. I walked slowly and carefully back onto the tree-lined road.

Yet I could often feel myself speeding up! Just a little, and then I would very consciously force myself to slow down for a bit. Then another urge to go faster. Over and over, this same visceral, primal feeling.

That's when I figured out what I had to do: I had to relax, and observe my thoughts and behaviors within the context of the larger system. A merging of two passions: Inspect-and-adapt (retrospection) meets Zen (introspection). In the Iron Cage of Death, of course.

And when I did that, the answer was there, as obvious as the shoes on my feet.

It's Not What You Think

Yes, I am taller, but that doesn't stop me from walking slowly. I had done it just fine the three previous days, when someone else led the walk. Granted, I now had no one in front of me to slow me down, but I could hear the footsteps behind me...

...and the person behind me seemed to be going much faster! He was going to run right into me! Why was he going so fast?! He must think I'm going too slow! Must hurry!

Reinforcing feedback loops! I'm taller! The guy behind me, in an attempt to keep up, is taking more steps. I would hear those steps, which sounded like someone running at me, and I would go faster. A simple feedback loop, funneled through the raw, exhausted emotional brain (while the higher functions were plotting and planning The Most Awesome Nature Walk, or some such nonsense), was like a physical force pulling me forward.

No Eyes, No Ears, No Drum, No Buffer, No Rope

Many of the following lessons may seem obvious; and that was the biggest lesson of all: Sometimes we forget.

  • A leader has to be aware of the actual abilities of the team; has to observe the team, and take their well-being into consideration. Otherwise, you may drive them all as hard as the fastest of them, rather than allowing the most deliberate teammate to set the pace. (The late, great Eli Goldratt's Theory of Constraints!)
  • The team will understand (i.e., the Complex Adaptive System will rebound) if you overtax them once. After that, they'll assume you're either sadistic or clumsy. And then they will start to lose interest in the path, in the goal, and in following you.
  • People know stuff. Leaders can't assume they know everything about the experience, lives, and talents of their colleagues. As far as I know, my teacher does not have an MBA, yet her advice was exquisitely tailored to my personality and to the situation, and thus was readily absorbed by me as real, deep learning.
  • There will be gaps between our glorious vision, and the actual implementation. And that has to be okay.
  • Every good leader has bad days. On those days, work hard to sustain clear-headed awareness, and give yourself a gap in time to consider your words and actions, even when you need to act quickly. Let people know you're not quite at 100%. The best leaders earn real trust by conveying honest vulnerability to the team. Why not give it a try? The alternative, faking invulnerability, will quickly run up against someone's BS-O-Meter, and then trust erodes.
  • Accountability lies with the leader (even if it wasn't your mistake). Yes, repair the system, re-examine the metrics, educate the team; but apologize and make amends. None of my friends were too overtaxed by the walk, but I did notice that the oldest of us (in his late 80's or early 90's) was limping afterwards. I apologized to him. Graciously, he said that he actually enjoyed the vigorous walk, though he wished he could have kept up. And, thankfully, after a day of rest he was no longer limping. Otherwise I would have offered to pay for a doctor visit. Sure, it's his responsibility to self-select his levels of participation. But if you take on the role of a leader for a team, you accept some responsibility for the care and feeding of that team.

  • When faced with an unfamiliar system, even a person experienced in other types of systems and feedback loops may not recognize the emergent behavior unfolding right before his eyes.
  • When faced with being an integral part of that unfamiliar system, your corporate toolbox will be made useless, you may momentarily lose sight of the common fundamentals, and you may let fight-or-flight emotional responses take over for you.
  • Pragmatic leadership skills and systems principles are likely the same in all circumstances, but you have to know that instinctively. Slow down and step back for a broader perspective. Before charging forward, take the time to observe the larger context. Ask the "Five Whys" of root-cause analysis.
  • Occasionally check that you are not misreading the feedback you receive from the system. You must trust the team, but also occasionally confirm that the metrics you rely on have not become cow-plop.
  • Blame the system, not the people. (This, I believe, comes from the Lean world, and I probably first heard it from Mary Poppendieck.) This is in reference to the above misinterpretation (or misapplication) of metrics. The guy behind me was not really asking me to go faster. Quite the contrary. He did nothing wrong. Too often managers "shoot the messenger" rather than adjust their own behaviors.

Training and Learning
  • Books on Agile, Cooking, Farming, Kung Fu, Leadership, Sex, Systems Theory, and Zen are often full of useful, practical information; but they are like rice-paper soles when you step in a fresh cow-pie. Everything worth doing, is worth doing.
  • We're human. I don't mean "We're human, we make mistakes. It's okay." We're all, inescapably, human systems. We have deep patterns of emotional response, and it takes a lot of training and effort to alter the physical responses that typically follow an emotional response. No matter how much we study something academically, we have to practice observing and adjusting our own personal feedback loops by immersing ourselves in a real environment. We have to make a personal effort: Our mental exercises--and perhaps even our well-crafted simulations--are not sufficient.

Cross-Disciplinary Reflection

I don't know how to summarize this blog post, so I'll let someone else have the last word. The following is a "gatha" (part poem, part prayer, part vow) by the late Robert Aitken. I stumbled upon this during the same retreat.

At a Zendo meeting for business
I vow with all beings
to drop my plan in the hopper
and let the process evolve.

-- Robert Aitken Roshi, The Dragon Who Never Sleeps