The key issue here is that you're trying to measure something that isn't quantifiable.
You want to measure things like "how good is this developer" or "How productive is this developer".
But the things you can measure are things like "Number of defects resolved", "Number of lines of code written" and "Number of hours worked".
You can use measurable things as a surrogate for the things you want to know, but you run the risk of gaming the system.
An example I recall reading years ago (can't find it with a quick google, so no attribution, but it's not mine):
Consider Adam, a developer. He'll
typically work 50 hours a week and
turn in around 2000 lines of finished
code. The quality of his work isn't
high - other developers will often
spend 40-50 hours fixing things up in
testing, but management isn't aware of
this.
Now consider Bradley, another
developer who sits next to Adam.
Bradley has "a life" and won't
normally work more than 40 hours a
week, though he's happy to pitch in
when required. He typically turns in
1500 lines of finished code each week
- code that works. It's rare for the testers to find any issues with his
code.
Finally, meet Candice. No one is quite
sure how many hours she works -
sometimes she's in the office before
everyone else, but it's not unusual
for her to leave at lunchtime. Some
suspect she only works 30 hours a week
- but she delivers on commitments, so noone is really worried. She's good at
spotting redundancies and simplifying
code - in a typical week she'll delete
as much code as she writes, leaving
the system more functional for the
same amount of code.
Who's the better developer? Adam works
more hours and completes more lines of
code; Bradley delivers fewer lines of
code but only works standard hours;
Candice never seems to add to the
codebase, works fewer hours than
contracted, but features assigned to
her pass testing when required.
In September 2006 I wrote about the Dangers of KPI choice on my blog - see What are you Measuring?