A friend of mine, Tony, recently put up a blog post entitled Developers Considered as Obstacle to Agility, detailing some of the challenges he’s faced getting some of the XP practices adopted in his workplace. I had already been thinking about motivation and teams, based on a post on the XP mailing list by Kevin Lawrence:
I don’t know anyone who has chosen to learn TDD who has not become test-infected. Quite a few have reverted to test-after, but none have reverted to not testing at all.
Recently I’ve been reading a book called Understanding Motivation and Emotion by John Reeve. In it, he says that there are 2 main types of motivation – internal and external, and that the external motivation breaks down into 3 categories, giving us four types of motivation:
- Intrinsic Motivation – “The innate propensity to engage one’s interests and exercise one’s capacities, and in doing so, seek out and master optimal challenges” 
- Identified Regulation – Represents an external motivation that is fully internalized. The difference between this and intrinsic motivation is that the person asks if the thing is important, versus enjoyable.
- Introjected Regulation – “…the person, /acting as a proxy for the environment/, emotionally rewards himself for performing other-defined good behavior and emotionally punishes himself for performing bad behavior” 
- External Regulation – the prototype of external motivation, people are not motivated without the presence of external factors. For example, choosing not to study until a test is upon you.
 Reeve, John Marshall /Understanding Motivation and Emotion/ 122-123
I thought about this in the context of the two main ways agile is introduced at companies – as a top-down process, or as a grass-roots effort from the developers. From a top down, it becomes very easy to get people to do the practices – you have External Regulation, or “Do this, or you don’t have a job”. Unfortunately, as the book goes on to talk about, this generally kills the internal motivation, and people never really adopt it.
Contrast this to a developer starting a grass-roots effort. This lone ranger sees the value of XP and how it can help the teams. However, she doesn’t get the benefit of having the authority to externally regulate or even set up a situation where people can introject regulation. She must convince the developers to either become internally motivated, or and least internalize the external motivation for doing it (i.e. One may not fully understand the philosophy of TDD, but they do it because they understand they get better code out of it).
In other words, a developer trying to introduce agile has to jump 2-3 levels above the motivational techniques management has at their disposal. However, the reward for all of that work is that the developrs internalize the concepts, and therefore become more passionate about it. They truly “get it”, and are less likely to be pushed over by the wind.
Unfortunately, the amount of work can be daunting and slow. You have to fight a lot of battles, and even if you think you are winning the war, you have lots of people saying you aren’t.
So, to those of you fighting the XP grass-roots battle, doing XP For One and working your tail off, be encouraged that the way you are introducing the practices is the best way to introduce new ideas if you want people to truly understand them. It will be a long road, and it will be a tough one, but the payoff at the end is truly worth it (“Hey, I get this TDD thing now!”).