Tuesday 27 July 2010

Some ideas for programmer metrics

Lines of code is a terrible metric of programmer productivity, prone to all sorts of gaming of the system, and here's a great story to illustrate: -2000 lines of code (+ some nice discussion).  Bill Atkinson ends up subverting the simplistic management by entering -2000 under the lines of code box, signifying the net number of lines he contributed during the week.

Of course, what this didn't capture was the qualitative detail of his work: identifying bugs, deleting, adding, fixing, abstracting, simplifying.  No single number can capture that.

Indeed, the great W Edwards Deming warned -- but who takes notice? -- that taking any measure (simple or complex) and rewarding or punishing according to it is asking to be gamed.  Doing so made #3 in his list of seven deadly diseases:
1. Lack of constancy of purpose
2. Emphasis on short-term profits
3. Evaluation by performance, merit rating, or annual review of performance
4. Mobility of management
5. Running a company on visible figures alone
6. Excessive medical costs
7. Excessive costs of warranty, fueled by lawyers who work for contingency fees
That said, it's not to say that metrics can't be useful as a source of insight.  I wonder whether a simple multi-dimensional metric on lines-of-code could be helpful.

Suggestion:
1. Lines of own code added
2. Lines of own code deleted
3. Lines of others' code added
4. Lines of others' code deleted
5. Lines of code deleted by others
I envisage that collecting this kind of data on a weekly basis (say) could show interesting patterns for individuals over time, and corroborate gut feelings about who is refactoring vs adding functionality vs breaking stuff etc.

Another aspect to consider is the scope of these metrics. Does one measure individuals, pairs, or whole teams? If the metrics were implemented for the whole team as a means of self-assessment changes over time could be due to external factors (changes in the kind of functionality requested, crunch times, etc.) or internal factors (learning, change of personnel, change of practices, etc.).

Saturday 19 June 2010

Tuesday 15 June 2010

Turning MS Office into a game

There's now a plugin to Microsoft Office, Ribbon Hero, that adds simple game dynamics to encourage users to better learn how to drive the darn thing, betwixt coffee breaks.

Informative article, here.  Excellent slides:



Beats the hell out of reading the manual.

Tuesday 4 May 2010

Bad writing

"The truth is, most US academic prose is appalling: pompous, abstruse, claustral, inflated, euphuistic, pleonastic, solecistic, sesquipedalian, Heliogabaline, occluded, obscure, jargon-ridden, empty: resplendently dead."

-- David Foster Wallace, in Authority and American Usage
Seen on Hacker news.  See also this article on business writing.

Tuesday 13 April 2010

C# is *slowly* turning into Eiffel

When I first read Bertrand Meyer's fabulous tome, Object-oriented Software Development, (2nd edition). in 1997 I guessed that it was ten years ahead of its time.  Seems like I wasn't too far off the mark, with .NET 4 introducing language independent support for Design by Contract, as code contracts, and patching up some of the covariance and contravariance issues of previous versions.

How long it will take for most programmers to use the techniques well is anyone's guess, but having mainstream tools that support these approaches is a good thing.

Wednesday 7 April 2010

Non-functional requirements

There's a lot of unglamorous stuff in software that is just "expected", and accounts for some of the project cost that you will miss when imagining two guys in a garage (or cafe) knocking out a quickie project.  Here's a handy list: Non-functional requirements: Minimal checklist.