Fwd: Re: [vox] Vista Stability

Christopher James McKenzie mckenzie at cs.ucdavis.edu
Fri Oct 26 17:33:33 PDT 2007


I have a handful of friends at Microsoft, some on the Windows team, who 
I respect quite a bit.  Microsoft certainly has some of the finest 
people in the industry working for them.

I believe that one of the problems that caused Microsoft Vista to be 
such a disappointment is because of some completely stupid modern 
programming paradigms.  It's founded in the emphasis on Computer Science 
over Computer Engineering.

The Scientist is worried about perfection, models, what's correct, 
abstractions.

The Engineer is worried about functionality, reliability, stability, 
usability.

The modern programming paradigms opt for virtual machines and run-time 
compilations and reflection and complex memory managers ... there is a 
complete disregard for the hardware that it's running on.  It's almost 
as if there is this magical black box underneath.

The modern programmer will look at the complexity of the algorithm, 
state it's a one time cost, say that's cheap and move on without 
considering the cost of the layers of abstraction underneath that have 
an unknown computational cost.

The modern programmer loathes programming and yearns for a system of 
abstract models and structures and defined interactions to implement 
their design architecture.

This works if all of the thousands of things this programming 
methodology relies on, and the hundreds of things that each of those 
thousands of things rely on, work flawlessly and without error - all the 
time.

This new modern programming paradigm has been heralded in as a time of 
squashing bugs and saying goodbye to the old world of seg faults and 
core dumps.  All these problems are handled for you now.  Except when 
something screws up.

See, beforehand your 1000 lines of code would have 500 lines of 
dependency code.

Under this model, those 1000 lines will be combined with an IDE 
generated set of 7000 other lines that depend on libraries of 10,000 
lines each that run on top of this sandboxes that are 100,000 each etc...

Try debugging that.  Where thread handling is supposed to be seamless 
and graceful and then you hit a race condition that everyone swears is 
impossible --- try going over the thousand and thousands of lines of 
dependency code and debugging that.  Try that.

Try explaining why some assignment operator takes 15 seconds - try 
finding the 15 second assignment operator amongst your magnificent 
future code when trying to debug.  You have to step through every 
operator and go down in the stack dozens of frames and put in mountains 
of debugging information to figure out what a modern assignment does.

And even if things are flawless, this new paradigm makes nothing easier.

Here are two examples:
C# has something called implicit casting that works like an operator 
overload.  So I can define implicitly how to convert one structure to 
another.

However, C# enumerations, which are only integers, need to still be 
explicitly casted

enum type
{	
	first,
	second
};

Now in c, circa 1970, you'd have to do

int i = (int) type.first;

However, in C#, circa 2007, you'd think there would be implicit casting 
set up.  No, actually you have to do the same thing:

int i = (int) type.first;


C++ has operator overloading and templated strings.

If I want to concatenate a string with an int, here is what you do in c:

char string[8] = "string";
int number = 4;
sprintf(string + strlen(string), "%d", number);

to get "string4"

In C++ you'd think that you could use "+" but no, you can't --- you are 
still using sprintf - which actually doesn't work because a string is a 
class so you have to wrap your int into a string class or first deal 
with chars and then move to a string.  You gain nothing but a headache.

But hey, it looks prettier.

----
These stupid stupid philosophies is why Vista sucks, why Firefox eats 
more then video editors did a few years ago, why all these things are so 
inexplicably slow and crazy to deal with.  It's what makes a bug-fix go 
from 5 minutes to 2 weeks and it makes code that you swear was just 
written 2 months ago, not compile with the latest libraries.


So now you know the secret.

~chris.


More information about the vox mailing list