September 20, 2010

...Learn TDD with Codemanship

What's The "Answer", Jason?

The fine line that has to be trodden in training adults is when to show them your solution and when to step back and let them make their own mistakes.

This is especially tricky with intelligent, highly-educated adults. People like you and me, while we're quite capable of learning, are nigh-on impossible to teach.

13 years of training and coaching software professionals has been an education in itself. The epiphany for me was about three years ago, when I resolved never to dare to "teach" developers again.

Instead, I now make my living creating the best opportunities for developers to learn. To learn from watching me, from each other and - most importantly - from experience.

A Codemanship course is about 20% learning from me, about 30% learning from the other people on the course and 50% learning from the practical exercises. Indeed, the whole purpose of my courses is to get a bunch of bright and enthusiastic developers together and give them a chance to try some techniques for themselves and to bounce ideas off each other.

I have learned to resist the temptation to tell people "the answer". Partly because in disciplines like OO design and test-driven development, there's no such thing as "the answer" and I wouldn't want to create the impression that there was. And partly because the actual lesson is in figuring it out for ourselves. A Codemanship course is the very beginning of a lifelong journey on which we get better and better at solving problems, not at knowing solutions to problems we've already solved - or that have been solved by somebody else.

Knowing Corey Haines' solution to the Game of Life kata is not as important as knowing how and why he arrived at that solution, and how that might apply to a different problem.

I certainly wouldn't want to rob smart, inquisitive people of that "Aha!" moment, which is what gets me up in the morning.

The danger is that when I show people my answer, there will always be those that prefer to learn solutions rather than develop a knack for solving problems, and they will take it away as a kind of formula and apply it to everything.

On the whole, people seem to prefer the new approach. What I can do for them is book a suitable venue, order the catering, present them with some talking points and set them some challenges to work on together and give the occasional nudge if they're really stuck. On my courses, I'm the swimming coach and the life guard, just in case anybody's really drowning.

As a pairing partner, I was often guilty of butting in with my "answer" without giving the driver a chance to come up with one of his own. I've hopefully learned my lesson and now I'm much happier to sit back and take in a bit of the scenery if we're going around the houses. As a trainer and coach, I've learned a similar lesson.

And, like all the best lessons, it's one nobody taught me.

Posted 7 years, 7 months ago on September 20, 2010