Counting code and cows
The Software Engineering Institute has produced an extensive set of guidelines for counting effort, size, and problems and defects. While it would at first seem that the task of estimating a future effort based upon past experience is relatively easy, the SEI's material demonstrates the challenges in doing this; there are typically more 'dimensions' in understanding the drivers associated with measurements than are immediately obvious.
Takeaways from this material (which are intuitively obvious, but easy and painful to forget) include:
*when you associate past effort per volume in order to estimate future effort for estimated volume, remember that effort and volume had better be normalized
*counting code or effort without understanding associated quality issues or downstream maintenance required to that code is like estimating how much paint you need to paint a room without thinking about how many coats of paint you'll need for coverage
*a line of code in one language is not the same as a line of code in another; be careful about what you're using for an estimating basis for your projects
*all days have 24 hours, but all work-days do not have 8 hours
*be sure you count all the things that drive your effort. If you write as much documentation as code, you better have counts for that as well.
The bottom line: if you aren't going to normalize how you count lines of code, labor hours, and other key paramaters, or you aren't explicit about the intended use of your answers, you may be wasting all the effort sifting through lots of low-level details. Parametric estimates are not a substitute for grass-roots estimates unless the grass roots believes in them!
[textile]
Often, what's even more important than the rules for counting is to understand the environment in which that counting occurs. Since I grew up on a diary farm, I find the following amusing antecdote particularly explanatory in this regard.[1]
[/textile]
----
[textile]
DEMOCRAT
*You have two cows.
*Your neighbor has none.
*You feel guilty for being successful.
*Barbara Streisand sings for you.
REPUBLICAN
*You have two cows.
*Your neighbor has none.
*So?
SOCIALIST
*You have two cows.
*The government takes one and gives it to your neighbor.
*You form a cooperative to tell him how to manage his cow.
COMMUNIST
*You have two cows.
*The government seizes both and provides you with milk.
*You wait in line for hours to get it.
*It is expensive and sour.
CAPITALISM, AMERICAN STYLE
*You have two cows.
*You sell one, buy a bull, and build a herd of cows.
DEMOCRACY, AMERICAN STYLE
*You have two cows.
*The government taxes you to the point you have to sell both to support a man in a foreign country who has only one cow, which was a gift from your government.
BUREAUCRACY, AMERICAN STYLE
*You have two cows.
*The government takes them both, shoots one, milks the other, pays you for the milk, and then pours the milk down the drain.
AMERICAN CORPORATION
*You have two cows.
*You sell one, lease it back to yourself and do an IPO on the 2nd one.
*You force the two cows to produce the milk of four cows.
*You are surprised when one cow drops dead. You spin an announcement to the analysts stating you have down sized and are reducing expenses.
*Your stock goes up.
FRENCH CORPORATION
*You have two cows.
*You go on strike because you want three cows.
*You go to lunch and drink wine.
*Life is good.
JAPANESE CORPORATION
*You have two cows.
*You redesign them so they are one tenth the size of an ordinary cow and produce twenty times the milk. They learn to travel on unbelievably crowded trains. Most are at the top of their class at cow school.
GERMAN CORPORATION
*You have two cows.
*You engineer them so they are all blond, drink lots of beer, give excellent quality milk, and run a hundred miles an hour. Unfortunately they also demand 13 weeks of vacation per year.
ITALIAN CORPORATION
*You have two cows but you don't know where they are.
*While ambling around, you see a beautiful woman.
*You break for lunch.
*Life is good.
RUSSIAN CORPORATION
*You have two cows.
*You have some vodka.
*You count them and learn you have five cows.
*You have some more vodka.
*You count them again and learn you have 42 cows.
*The Mafia shows up and takes over however many cows you really have.
TALIBAN CORPORATION
*You have all the cows in Afghanistan, which are two.
*You don't milk them because you cannot touch any creature's private parts.
*Then you kill them and claim a US bomb blew them up while they were in the hospital.
IRAQI CORPORATION
*You have two cows.
*They go into hiding.
*They send radio tapes of their mooing.
[/textile]
-----
Note this has been about counting cows, not code, but the message remains the same - remember the context in which counting has occurred! See the Wickipedia for more amusing two cows info.
[textile]
fn1. Apologies in advance for offending any national or political sensitivities, but we have attempted to be fair by offending all equally!
- Bryan Pflug's blog
- Login or register to post comments
