As usual, The Codist is slightly controversial and bluntly states that What Programmers Want is Less Stupid and More Programming.
So no matter what you do the best programmers will motivate themselves if you give them challenging code to write or problems to solve, and keep the stupid as far away as you can. Give them a work environment that makes this possible and consistent. Manage them with this understanding. Rewards are nice but the ultimate motivator is still opportunity.
In the end Andrew comes down to the Free Game theory of programmer motivation that was first popularized in Tracy Kidder’s book The Soul of a New Machine, but that does not detract from the overall thrust that you have to keep the stupid away from your developers.