There is a big mismatch in how businesses try and motivate developers (carrots and sticks) and how they should be motivated. I have known this for some time and as I lead engineering groups I work to make room for the teams or individuals in my group to be motivated more by what really counts.
Give them high level goals but dictate as few details possible (autonomous), peer pressure rather than management reviews of quality and embrace the latest tools and technologies so they can excel at in their field (mastery). Combine this with a positive, supportive team dynamic and a product that makes a difference and you have all the ingredients to an exceptionally productive team.
I had thought that developers were especially sensitive to this effect (and maybe they are) but it turns out its all ~real~ work that requires thought and social science has proven it over and over. Daniel Pink makes his case in this TED talk. Its worth a watch.