It's funny that the comments here are so negative, and yet, in the real world, this effect proves true over and over again. For example, I've noticed that sometimes you'll have a team of developers just collecting a paycheck, and when a new guy comes on who's hypermotivated, the motivation of the entire team increases.
It's just a fact of life that a very large number of people, including developers, often operate at submaximal performance. They aren't leaving poor code simply because they don't have enough time to do everything that need's doing. They're leaving poor code because they're browsing the web, chatting, or thinking about other things.
Also, there's a lot of really boring code that needs writing. Not everyone can work on interesting projects. Boring code can still benefit from being written with care and motivation.
A good programmer is one who writes good code because their personality requires them to write good code.
If you need to resort to competition games, you don't have the right people.
I have been in a situation of yelling at my technical lead to write less good code ("That won't work for the general case" "I don't care about the general case! Special case it so we can get it out the door!" "No! That's just wrong!" "I don't care!" etc etc). I'd much rather deal with that than having to play mindgames to get people to do the right thing.
YAGNI isn't a piece of cake either. I remember when I first got a job as a junior I used to spend endless nights trying to template stuff in C++. I feared it might not work for the general case. As it turned out several months later in practice:
1. I didn't knew what the general case was so it wasn't supporting that.
2. Code was so fucking complicated trying to suit the general case. I had to throw it out. I had to write new code that actually solved new cases.
3. I wasted about a week on what could probably be done in 30 minutes at that time.
4. There were third-party libraries (Boost) that were written by people who actually dealt with the general case but I wasn't allowed to use them since they "bloated code". Those libraries would've saved me time when I wrote the original damn thing, when I had to introduce new cases (probably), and when I had to debug that crappy code of mine.
Number three has also caused me to learn what kind of stuff can bring someone's productivity up by orders of magnitude.
I also learned that I should have freedom on what libraries I have to use because micromanagement is dumb.
Just because we don't like it and it really gets under our skin, doesn't mean that it does not work.
However, I do not suggest using it as a management technique. There is regular performance and adrenaline-based performance. The latter is not likely to happen full-time.
It's just a fact of life that a very large number of people, including developers, often operate at submaximal performance. They aren't leaving poor code simply because they don't have enough time to do everything that need's doing. They're leaving poor code because they're browsing the web, chatting, or thinking about other things.
Also, there's a lot of really boring code that needs writing. Not everyone can work on interesting projects. Boring code can still benefit from being written with care and motivation.