Free Republic
Browse · Search
News/Activism
Topics · Post Article

Skip to comments.

We Are Morons: a quick look at the Win2k source code
Kuro5hin ^ | Feb 16, 2004 | Selznak

Posted on 02/19/2004 12:01:56 PM PST by mikegi

... Despite the above, the quality of the code is generally excellent. Modules are small, and procedures generally fit on a single screen. The commenting is very detailed about intentions, but doesn't fall into "add one to i" redundancy.

There is some variety in the commenting style. Sometimes blocks use a // at every line, sometimes the /* */ style. In some modules functions have a history, some do not. Some functions describe their variables in a comment block, some don't. Microsoft appears not to have fallen into the trap of enforcing over-rigid standards or universal use of over-complicated automatic tools. They seem to trust their developers to comment well, and they do.

However, not everything is so rosy. Some of the modules are clearly suffering from the hacks upon hacks mentioned earlier. As someone who struggled immensely trying to get the MSInet control working not long after this code was released, it's a relief to see that the inet code is as bad as I thought.

From the comments, it also appears that most of the uglier hacks are due to compatibility issues: either backward-compatibility, hardware compatibility or issues caused by particular software. Microsoft's vast compatibility strengths have clearly come at a cost, both in developer-sweat and the elegance (and hence stability and maintainability) of the code. ...

(Excerpt) Read more at kuro5hin.org ...


TOPICS: Business/Economy; Extended News; News/Current Events; Technical
KEYWORDS: software; source; windows
Navigation: use the links below to view more comments.
first 1-2021-4041-46 next last
Pretty funny article (at least to programmers). The quoted comments are tame. The one about the alpha compiler obviously came after a frustrating debugging session.

IMHO, debugging an app-breaking bug in a new OS ranks right up there with slamming my weenie in a sliding glass door. You get to debug both the OS and the app. You're told that your code "breaks" an existing app, one you know to be a POS. You spend an hour tracing through the bug and discover that the app has an uninitialized local variable. In the previous OS, it just happens that an API - totally unrelated to your code - zeroes the location on the stack where the uninitialized variable will reside later on. So, you go to the owner of that code and explain to him that he needs to zero the stack on exit. He looks at you like you have two heads but does it anyway.

It's a good thing that I never met the people who wrote certain popular apps. Of course, I could probably claim insanity at my trial for first degree murder. There was a fax app that gave me fits and a genealogy app ... The worst app was a driver for a high end sound card - it got rave reviews but internally was a mess.

1 posted on 02/19/2004 12:01:57 PM PST by mikegi
[ Post Reply | Private Reply | View Replies]

To: mikegi
>>ranks right up there with slamming my weenie in a sliding glass door.

Man, you actually do that?
2 posted on 02/19/2004 12:04:33 PM PST by 1stFreedom
[ Post Reply | Private Reply | To 1 | View Replies]

To: 1stFreedom
>>ranks right up there with slamming my weenie in a sliding glass door.

Man, you actually do that?


Whatever floats your boat fellas.
3 posted on 02/19/2004 12:07:32 PM PST by jmcclain19
[ Post Reply | Private Reply | To 2 | View Replies]

To: mikegi
//** Thanks for the Awesome Tagline fodder **//
4 posted on 02/19/2004 12:09:42 PM PST by .cnI redruM (<HACK>It's a variadic function .... (It probably makes more sense when you're stoned.)</HACK>)
[ Post Reply | Private Reply | To 1 | View Replies]

To: jmcclain19
>>>>ranks right up there with slamming my weenie in a sliding glass door.

>>Man, you actually do that?

>>Whatever floats your boat fellas.

I don't know about you, but that sinks my boat.
5 posted on 02/19/2004 12:13:25 PM PST by 1stFreedom
[ Post Reply | Private Reply | To 3 | View Replies]

To: mikegi
The worst app was a driver for a high end sound card - it got rave reviews but internally was a mess.

As long as it works is my motto.

6 posted on 02/19/2004 12:13:51 PM PST by smith288 (http://www.ejsmithweb.com/FR/JohnKerry/)
[ Post Reply | Private Reply | To 1 | View Replies]

To: mikegi
I like this part:


// the kerrying alpha cpp compiler seems to kerry up the democrat type "LPITEMIDLIST", so to work
// around the kerrying peice of clinton compiler we pass the last param as an void *instead of a LPITEMIDLIST

Some insight into Microsoft's famous daily build process is given in private\windows\media\avi\verinfo.16\verinfo.h:
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* !!!!!!!IF YOU CHANGE TABS TO SPACES, YOU WILL BE KILLED!!!!!!!
* !!!!!!!!!!!!!!DOING SO kerryS THE BUILD PROCESS!!!!!!!!!!!!!!!!
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7 posted on 02/19/2004 12:14:24 PM PST by js1138
[ Post Reply | Private Reply | To 1 | View Replies]

To: js1138
I hate spaces
8 posted on 02/19/2004 12:15:48 PM PST by smith288 (http://www.ejsmithweb.com/FR/JohnKerry/)
[ Post Reply | Private Reply | To 7 | View Replies]

To: rdb3; chance33_98; Calvinist_Dark_Lord; Bush2000; PenguinWry; GodGunsandGuts; CyberCowboy777; ...
Tech Ping
9 posted on 02/19/2004 12:18:04 PM PST by ShadowAce (Linux -- The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 1 | View Replies]

To: smith288
I do believe mild profanity is helpful in comments, particularly if you have to work around a compiler bug. Comments should reflect the conceptual difficulty at arriving at a solution. If you are forced to write a kluge you should say so.

I have on a few occasions put in comments saying I really don't know the best way to do this, but here's what seems to work. Feel free to improve it.
10 posted on 02/19/2004 12:26:16 PM PST by js1138
[ Post Reply | Private Reply | To 8 | View Replies]

To: mikegi
The only thing that worries me about the code as shown in the article is the priorities of Microsoft. There's clearly a pattern that the Office people can write whatever junk they want, leaving the OS people to program many hacks to get around it.

In other words, if you don't use Office (and to a lesser extent other various apps), you're using an OS loaded with thousands of unnecessary admittedly ugly hacks. Likely they did this to make the user experience have fewer problems, but at what cost?

If an app is causing problems, then put the burden where it belongs and fix the app, not the OS.
11 posted on 02/19/2004 12:37:17 PM PST by antiRepublicrat
[ Post Reply | Private Reply | To 1 | View Replies]

To: js1138
Or...


// its late, im tired, this function sucks... dont laugh...
12 posted on 02/19/2004 12:37:28 PM PST by smith288 (http://www.ejsmithweb.com/FR/JohnKerry/)
[ Post Reply | Private Reply | To 10 | View Replies]

To: antiRepublicrat
Sounds like a limp wristed wimp running the OS division. Gets some gnads and tell the Office people to watch their code.
13 posted on 02/19/2004 12:39:14 PM PST by smith288 (http://www.ejsmithweb.com/FR/JohnKerry/)
[ Post Reply | Private Reply | To 11 | View Replies]

To: mikegi
Be careful about looking at the code. MS is sending warnings to people. I am not sure how it got into the wild, but it's their property and should be treated like it was stolen.
14 posted on 02/19/2004 12:46:29 PM PST by Salo (You have the right to free speech - as long as you are not dumb enough to actually try it.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Salo
Know your rights.
These are your rights.


All three of em.
15 posted on 02/19/2004 12:57:18 PM PST by kinghorse
[ Post Reply | Private Reply | To 14 | View Replies]

To: kinghorse
Great song, great album. Band was a buncha commies. :-)
16 posted on 02/19/2004 1:02:59 PM PST by Salo (You have the right to free speech - as long as you are not dumb enough to actually try it.)
[ Post Reply | Private Reply | To 15 | View Replies]

To: mikegi
There's something familiar about that site. Why am I thinking of a ZOT!?
17 posted on 02/19/2004 1:03:38 PM PST by JoJo Gunn (Gut and raze the NEA! ©)
[ Post Reply | Private Reply | To 1 | View Replies]

To: jmcclain19
>>ranks right up there with slamming my weenie in a sliding glass door.




YEEEEEEEEEEEEEEOOOOOOOOOWWWWWWWWWWWWWWWWWWWWW
18 posted on 02/19/2004 1:05:01 PM PST by nobody_knows
[ Post Reply | Private Reply | To 3 | View Replies]

To: mikegi
The worst app was a driver for a high end sound card -

Dang it! Which card was it?
19 posted on 02/19/2004 1:28:24 PM PST by TalBlack ("Tal, no song means anything without someone else....")
[ Post Reply | Private Reply | To 1 | View Replies]

To: antiRepublicrat
If an app is causing problems, then put the burden where it belongs and fix the app, not the OS.

Uhhhh, what about the millions of users out there that are happily running the app on the older OS? They won't buy an OS upgrade that tubes their existing apps. As you add new features they can expose unexpected behavior in existing apps (like the uninitialized variable I noted earlier). Regardless of the cause, your new OS is incompatible, so you have to hack around it.

20 posted on 02/19/2004 3:02:22 PM PST by mikegi
[ Post Reply | Private Reply | To 11 | View Replies]


Navigation: use the links below to view more comments.
first 1-2021-4041-46 next last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
News/Activism
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson