Far more important than trying to motivate people is help them by removing the barriers to them motivating themselves.
The reason for this is the difference between intrinsic and extrinsic motivation.
From the Wikipedia page:
Intrinsic motivation refers to motivation that is driven by an interest or enjoyment in the task itself, and exists within the individual rather than relying on any external pressure.
Extrinsic motivation comes from outside of the individual. Common extrinsic motivations are rewards like money and grades, coercion and threat of punishment. Competition is in general extrinsic because it encourages the performer to win and beat others, not to enjoy the intrinsic rewards of the activity. A crowd cheering on the individual and trophies are also extrinsic incentives.
According to research, intrinsic motivators are much more powerful than extrinsic motivators:
At lower levels of Maslow's hierarchy of needs, such as physiological needs, money is a motivator, however it tends to have a motivating effect on staff that lasts only for a short period (in accordance with Herzberg's two-factor model of motivation).
At higher levels of the hierarchy, praise, respect, recognition, empowerment and a sense of belonging are far more powerful motivators than money
Now while there is little evidence of Maslow's hierarchy itself, it is a useful hook when describing intrinsic verses extinsic motivators.
The surprising thing that comes out of the research though, is that providing extrinsic motivators can actually reduce or remove the intrinsic motivators:
Social psychological research has indicated that extrinsic rewards can lead to overjustification and a subsequent reduction in intrinsic motivation. In one study demonstrating this effect, children who expected to be (and were) rewarded with a ribbon and a gold star for drawing pictures spent less time playing with the drawing materials in subsequent observations than children who were assigned to an unexpected reward condition and to children who received no extrinsic reward.1
- Undermining Children’s Intrinsic Interest with Extrinsic Reward; A Test of ‘Overjustification’ Hypothesis, Lepper, Greene & Nisbett.
Thus, in general it is far more effective to remove barriers intrinsic motivation than it is to try an increase extrinsic motivators. This was the essence of many elements of both DeMarco & Lister's Peopleware and Fred Brooks' The Mythical Man-Month. These should be considered essential reading for any manager of software engineers, but could also help managers of other knowledge workers.
For more information, I would highly recommend this animation of one of Daniel Pink's talks on his book "Drive: The Surprising Truth About What Motivates Us".*