Saturday, June 17, 2006

Truth, Lies and Lines of Code

The ever quoted, "Broken Windows Theory": "Turns out they're actually great project managers. They knew months in advance that the schedule would never work. So they told their VP. And he, possibly influenced by one too many instances where engineering re-routes power to the warp core, thus completing the heretofore impossible six-hour task in a mere three, summarily sent the managers back to "figure out how to make it work."? The managers re-estimated, nipped and tucked, liposuctioned, did everything short of a lobotomy -- and still did not have a schedule that fit. The VP was not pleased. "You're smart people. Find a way!" This went back and forth for weeks, whereupon the intrepid managers finally understood how to get past the dilemma. They simply stopped telling the truth. "Sure, everything fits. We cut and cut, and here we are. Vista by August or bust. You got it, boss.""

The whacky thing still is that they're measuring productivity of programmers as lines of code, like numbers of cars produced. It's features delivered over time that counts, user visible features.

And here's part of the answer "How to refactor": "Essentially, you decide how it is you're going to write code and that's it. Product management asks for a new feature, you estimate based on your best work. What you don't do is offer choices:

"Well, that's going to affect a part of our source code that's not really testable. Cleaning that up and adding the feature will take a week, but I suppose I could get it done quicker if I don't refactor right now."

Eeek. It doesn't matter how much you decorate offers like that with warnings about how you can't really promise them the hack won't come back to bite them, blah, blah, blah... The quick-and-dirty decisions will be chosen often enough and you'll start moving backwards.

So we only write code one way and there's only one estimate:

"It will take a week. The reason the estimate is longer than similar features is because that code doesn't have unit tests yet and I'll have to move some things around in order to write them. The good news is that the next time you ask for a change in this area, it will go faster."

That's it. No choices."

Update: Peter Kantz's picked up on the same point (and similar title) and added that Microsoft is supposed to be using Scrum, which highlights the need for transparency. Via, "Microsoft Vista: Scrum or Not-Scrum".
Post a Comment