How to Motivate Programmers

May 22, 2009

There's an inherent paradox in motivating programmers. I think this Geek Hero Comic illustrates it perfectly:

geek-hero-panel-1.png

geek-hero-panel-2.png

It's a phenomenon I've noticed even in myself. Nothing motivates like having another programmer tell you they're rewriting your code because it sucks. Dave Thomas has talked about this for years in his classic Developing Expertise presentation, supported by the following quote:

Interestingly enough, a friend of mine (who is a quality control manager in a hospital) often makes identical statements in reference to doctors: Polite requests, coercion, etc. are useless at best and often detrimental. Peer pressure and competition are the key.

Don't try to race sheep,
Don't try to herd race horses

Yes, the use of the term sheep is mildly derogatory, but the general principle is sound: use motivational techniques that are appropriate to the level of developers you're working with. If you have neophyte developers, herd them with maxims, guidelines and static rules. If you have experienced developers, rules are less useful. Instead, encourage them to race: engage in a little friendly competition and show off how good they are to their peers.

Posted by Jeff Atwood
111 Comments

Great post and draw. Thank you for sharing.

wow power leveling on October 21, 2009 7:08 AM

Thanks for your information, i have read it, very good!

ed hardy clothing on October 22, 2009 9:24 AM

Thanks for your information, i have read it, very good!

Very cool! Congrats on the pairing.

street lamps on October 24, 2009 2:51 AM

You can take all your time to recover, because Ross is doing very well.
I think no one even a dying man can have tolerance for this.

Coagulant on November 4, 2009 1:18 AM

Really? Very interesting cartoon.

Wastewater treatment on November 4, 2009 1:21 AM

Impressing cartoon.

Grinding media on November 4, 2009 1:23 AM

Thanks very much, I had read this.

valves manufacturer on November 11, 2009 12:50 PM

dfsd sdfsdf

Great on November 17, 2009 1:36 AM

The thing that the post misses (and nobody in the comments seems to have called out) is the backstory. If you read more than one geekhero comment, you quickly find out that Ross is the world's worst programmer and a complete idiot (The "optimization" is that he deletes all the blank lines between functions or something similar).

At any rate, "Randall" isn't jumping up in arms because his code is being rewritten, he's jumping because "Ross" is going to screw it up so badly!

I'm as competitive as the next guy, and I'll get a bit of a bruised ego if someone rewrites my code on account of it being crap, but at the end of the day, either they're wrong (and you rollback the revert) or they're right, and you LEARN from them fixing up your crappy code. Making some kind of competition out of 'rewriting eachothers code' just sounds like a great way to create politics, make everyone pissed off at eachother, and generally ruin morale.

Orion Edwards on February 6, 2010 11:16 PM

This is the primary reason that peer code review works!

It's not metrics, not tools, not "process."

It's just that if you know someone else will be *critically* looking at your code, you do your best.

Jason Cohen on February 6, 2010 11:16 PM

Many times, I've looked at a piece of code, and asked out loud "what idiot wrote this?". More than once, the answer has been "me". We all make mistakes sometimes.

Simon on February 6, 2010 11:16 PM

«Back

The comments to this entry are closed.