Microsoft Windows reveals stupidity…

Part of the source code to Windows 2000 had been leaked onto the Internet before, and pretty it was not. Microsoft’s flagship product turned out to be a vast sprawl of spaghetti in Assembly, C and C++, all held together with sticky tape and paper clips. The source code files contained many now-infamous comments including “We are morons” and “If you change tabs to spaces, you will be killed! Doing so f***s the build process”.

There were many references to idiots and morons, some external but mostly at Microsoft. For example:

* In the file privatentosrtlheap.c, which dates from 1989:
// The specific idiot in this case is Office95, which likes
// to free a random pointer when you start Word95 from a desktop
// shortcut.

* In the file privatentosw32ntuserkernelswp.c from 11-Jul-1991:
// for idiots like MS-Access 2.0 who SetWindowPos( SWP_BOZO )
// and blow away themselves on the shell, then lets
// just ignore their plea to be removed from the tray.

* Morons are also to be found in the file privategenxshellincprsht.w:
// We are such morons. Wiz97 underwent a redesign between IE4 and IE5

* And in privateshellshdoc401unicppdesktop.cpp:
// We are morons. We changed the IDeskTray interface between IE4

* In privateshellbrowseuiitbar.cpp:
// should be fixed in the apps themselves. Morons!

* As well in privateshellextftpftpdrop.cpp:
We have to do this only because Exchange is a moron.

Microsoft programmers also take their duty to warn their fellow developers seriously against unsavory practices, which are apparently committed on a regular basis. There are over 4,000 references to “hacks”. These include:

* In the file privateinetmshtmlsrccorecdbasebaseprop.cxx:
// HACK! HACK! HACK! (MohanB) In order to fix #64710
// at this very late date

* In privateinetmshtmlsrccorecdutilgenutil.cxx:

* In privateinetmshtmlsrcsitelayoutflowlyt.cxx:
// God, I hate this hack …

* In privateinetwinineturlcachecachecfg.cxx:
// Dumb hack for back compatibility. *sigh*

* In privateispupkitrusttrustuiacuictl.cpp:
// Believe it or not there is no way to get current height

* In privatentosudfsdevctrl.c:
// Add to the hack-o-rama to fix formats.

* In privateshellshdoc401unicppsendto.cpp:
// Mondo hackitude-o-rama.

* In privatentosw32ntconserverlink.c:
// HUGE, HUGE hack-o-rama to get NTSD started on this process!

* In privatentosw32ntuserclientdlgmgr.c:

* In privateshelllibutil.cpp:

* In privatentosw32ntuserclientnt6user.h:
// The magnitude of this hack compares favorably with that
// of the national debt.

The most worrying aspect here is not just how these bad practices persist and even find their ways into release builds in large numbers. After all, few things are as permanent as a “temporary” solution. Nor is it surprising how much ancient code still exists in the most recent versions of Windows (although it is somewhat unsettling to see how decades-old mistakes continue to be a problem). No, the most frightening thing is that Microsoft’s developers obviously know they are doing terrible things that serious undermine the quality of the end product, but are apparently unable to remedy the known bad quality of their own code.

As you may remember, Windows XP was already out by the time that the above source code got leaked. In fact, back in 2004, Microsoft had been talking about Longhorn (Windows Vista) for three years. Just a few months after the source code leaked out, it was announced that WinFS, touted as Microsoft’s flagship Relational File System Of The Future, would not ship with Vista after all. The reason isn’t hard to guess: Windows’ program code has become increasingly unmaintainable and irrepairable over the years.

more at :

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s