When Microsoft and IBM were working on OS/2 together (this was some time ago now), MicrosoftCorporation
sent a bunch of programmers to work with the IBM team, who had already done some development. The two cultures clashed in a big way, however, and IBM eventually complained that the Microsoft programmers were having a negative effect on productivity.
How was that conclusion reached? IBM measured productivity in terms of number of lines of code produced. Microsoft programmers were coming in and taking the bloated code produced by IBM programmers and simplifying it to fewer lines of code. The metric showed a net loss of productivity since the total number of lines of code was going down.
Bill Gates said it was like IBM was racing to build the world's heaviest airplane.
Ah, but Microsoft is often accused of building lighter airplanes that crash often....
It's worth noting that, although I have heard this story
many times, I have never seen an authoritative attribution.
In many ways, it's like those claims, occasionally made,
that Bill Gates was an incredible
programmer and that
his code was the leanest, meanest, and tightest code that
people had ever seen.
There are at least three major implausibilities: (1)That
Microsoft programmers were, to the extent implied, simply
rewriting IBM programmers's code, (2) That the people who
went on to produce Windows NT were producing significantly
leaner code than the people who, after the split, produced
OS/2, and (3) The implicit claim that "more lines" is
"bloated" and that "fewer lines' corresponds to
What's more, even if the story is true, the behavior
attributed to the M'Soft programmers is
example of bad practice. Not only did they not add
functionality (instead focusing on trimming other
people's code), they also removed expertise (the original
programmers were no longer experts in the code they had
written), they stepped on people's toes (would you like it
if someone else, who was supposed to be doing something
different, instead spent their time rewriting your code)
It's an interesting story. It's mostly put about by people
claiming nice things about Microsoft and, even if we stipulate
that it's 100% correct, it really says bad things about
I agree that the story may or may not be true, but I also have an observation. The ethics of what the MS programmers did is really culturally relative. If they do not practice code ownership, and every anecdote that I've heard supports this, doing rewrites of other people's code is not too bad from their point of view. Heck, they even like to rewrite standards.
Could it be that ego-less programming can become superego-less programming? This is not the typical migration, but it can be a side effect of GroupThink
. -- MichaelFeathers
The story may be overstated but it the overall message is true. Lines of code are not a good measure of productivity. It is like paying a salesman according to how many miles he's driven in his car rather than how many widgets he's sold. I've certainly had days when my "productivity" was negative by this measure; when the only way to add a feature or fix a bug was to tear out several pages of verbose, repetitive, inefficient and difficult to read code and replace it with some short, clean, efficient and maintainable. -- DaveHarris
Lines of code as a measure of productivity is horrible
. No problem
there. And yes, egoless programming is often a good thing. But what
we have in the anecdote is, in the course of a single project,
IBM people writing code and Microsoft people(who almost certainly
have their own set of tasks) rewriting it.
Which, I suspect, is horrible project management.
Not only that, but the claimed superiority of the newer code is
attributed to superior skill, rather than the "rewrite effect"
(we all do better on a second pass, even if the first pass was by
somebody else). Which means that the conclusion of the anecdote is
also pretty implausible.
Ah well, I'm being hypercritical.
I don't think that the claim that the code is better translates into
a claim of superior skill. Quite the opposite. It seems to me that
the point of the story (which may be apocryphal, I admit) is that
because the _culture_ of IBM required that productivity be measured
according to lines of code produced, even the best of programmers
are going to produce bloatware. It is a cultural norm. If you can't
adapt to such a system, you are better off finding a job elsewhere
because you are going to be mighty unhappy.
I'd also wish the product was something other than OS/2. Many people
have a religious zeal toward this product. All I can offer is the
suggestion that you keep in mind we are talking about OS/2 1.0, which
by all accounts was a grotesque piece of code. IBM hated it so much
that it threw it out completely and started from scratch, I understand.
And perhaps IBMs processes were more sensible by then.
As to the question of whether other people should work on code, this
gets to the heart of TheCathedralAndTheBazaar
argument. Linux has shown
that many eyes make for shallow bugs, and you can have many people
making changes to code without losing control. Is it better or worse?
That depends on which side you come down on in the argument.
The story I heard had MS programmers irritating IBM by dressing like slobs, showing up late for work, cooking coffee in their cubes, maliciously reducing the line count, and holding impromptu Frisbee games on the lawn, so I have no reason to doubt any of it.
Similarly, I heard that BillGates
, in MS's Albuquerque days, had a habit of noticing some engineer's code unattended, then with a spasm of inspiration just f---ing it up horribly trying to improve it. Authority vs Responsibility, folks! --PhlIp