Chad Perrin: SOB

4 December 2008

lines spent

Filed under: Geek — apotheon @ 10:58

This entry is for the people searching for the Dijkstra quote about “lines spent”.

This evening, I commented on a Chip’s Quips entry, titled Chipping the web: December 2nd. Yeah, not very descriptive. At any rate, discussion had reached the point where Chip (aka Sterling) and I were talking about the motivations behind panicky legislative actions like the $700 billion bailout bill.

I said:

I think half the laws that get passed by legislators are penned in the first place only because they figure they won’t get reelected if they don’t pass more laws. It’s like the whole lines of code metric of productivity: the more lines of legislation they write that get passed into law, the more work they’re doing for their constituents.

Dijkstra was closer to being on the right course, with his statement that — if we’re going to measure lines of code — we should measure them not as lines produced, by but lines spent. That goes double for legislation.

While composing that comment, I did a Google search for the Dijkstra quote to make sure I was remembering it correctly. I didn’t want to credit Dijkstra and find out it was someone like Donald Knuth who had said it. The full quote, by the way, is from Dijkstra’s On the cruelty of really teaching computer science:

From there it is only a small step to measuring “programmer productivity” in terms of “number of lines of code produced per month”. This is a very costly measuring unit because it encourages the writing of insipid code, but today I am less interested in how foolish a unit it is from even a pure business point of view. My point today is that, if we wish to count lines of code, we should not regard them as “lines produced” but as “lines spent”: the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger.

The search term I entered into Google’s text box was:

"lines spent" code

The results looked like this:

Because the number four result in a Google search was to Lines of Code: The New Heresy — which doesn’t even mention Dijkstra, let alone actually quote him — I figured I should do Googlers like myself the favor of making sure I have an entry here at SOB that offers the exact Dijkstra quote, and even links to a source for it. Thus, this SOB entry was born. I hope it helps someone.

2 Comments

  1. […] who do stupid things like try to measure programmer productivity in lines of code produced (aka lines spent), version control check-ins, and so on, over a given period of […]

    Pingback by Chad Perrin: SOB » How is an economy like technology? — 17 December 2008 @ 01:50

  2. It helped me today.

    Comment by Jeremy Dunck — 18 May 2011 @ 10:26

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

All original content Copyright Chad Perrin: Distributed under the terms of the Open Works License