Critical Section


everything you need to know about COM

Sunday,  04/20/08  08:53 PM

<rant optional="absolutely">

Everything you need to know about COM:

//
// Success codes
//
#define S_OK    ((HRESULT)0x00000000L)
#define S_FALSE ((HRESULT)0x00000001L)

For those of you keeping score at home, please note that since time zero in all computers everywhere a nonzero value has meant true, and a value of 0 has meant false.  In their infinite lack-of-wisdom, the COM designers decided to invert this convention.

This really is everything you need to know about COM.  It was clearly designed by junior programmers who weren't even aware of the most basic programming conventions.

How does this happen?  Big companies like Microsoft hire the best and the brightest, the smartest young kids coming out of school.  These people are smart, but they are not knowledgeable.  They haven't lived long enough to understand that reinventing the wheel is not only inefficient, it leaves you with two different wheel designs to maintain.

About twenty years ago I worked on a computer called the IBM Series/1.  We ended up doing quite a bit of debugging of the operating system, and IBM eventually hired us to maintain the OS for them (I am not making this up).  I saw exactly the same thing; a system designed by smart young programmers without experience, full of wheel reinventions and neglected programming conventions.

Just about everywhere you care to look in the software development world, there are two ways to do things, the Microsoft way, and the other way.  In just about every case, the other way came first, and then Microsoft came along, ignored what had been done before, and reinvented the wheel.  Their size and market share have allowed them to survive with an incompatible approach. 

Probably the best example (or worst offense, depending on your view) is in browsers; all over the internet there are two ways to do things, the Microsoft IE way, and the all-other-browsers on all-other-platforms way.

In fact .NET itself is like this; first there was Java, everyone used it, and then Microsoft reinvented it.

So what about .NET?  Certainly Anders Hejlsberg (the designer of .NET) is smart and experienced.  The API design is – by general agreement – brilliant.  Or at least much better than Win32 / GDI.  It is however also incompatible with Win32 and GDI, a major reinvention of the wheel.  It could be argued that this was necessary in order to clean things up and move forward.  Maybe.  It could also be argued that the net amount of work for everyone in adapting old code to a new API exceeds the benefit.

{And where does that leave VB.NET?  Not brilliant, IMNSHO, not necessary, and not even helpful.  Just a needless wheel reinvention.  So much work has been expended in converting VB 6 to VB.NET, for so little benefit.}

One final note.  When a function succeeds, the status is ERROR_SUCCESS.  In addition to having a beautifully ambiguous name, the value of ERROR_SUCCESS is zero (false).  I am not making this up.

</rant>

Oleosaurus out...

Home
Archive
flight
About Me
W=UH
Email
RSS   OPML

Greatest Hits
Correlation vs. Causality
The Tyranny of Email
Unnatural Selection
Lying
Aperio's Mission = Automating Pathology
On Blame
Try, or Try Not
Books and Wine
Emergent Properties
God and Beauty
Moving Mount Fuji The Nest Rock 'n Roll
IQ and Populations
Are You a Bright?
Adding Value
Confidence
The Joy of Craftsmanship
The Emperor's New Code
Toy Story
The Return of the King
Religion vs IQ
In the Wet
the big day
solving bongard problems
visiting Titan
unintelligent design
the nuclear option
estimating in meatspace
second gear
On the Persistence of Bad Design...
Texas chili cookoff
almost famous design and stochastic debugging
may I take your order?
universal healthcare
entertainment
triple double
New Yorker covers
Death Rider! (da da dum)
how did I get here (Mt.Whitney)?
the Law of Significance
Holiday Inn
Daniel Jacoby's photographs
the first bird
Gödel Escher Bach: Birthday Cantatatata
Father's Day (in pictures)
your cat for my car
Jobsnotes of note
world population map
no joy in Baker
vote smart
exact nonsense
introducing eyesFinder
resolved
to space
notebooks
where are the desktop apps?