jump to navigation

We Are Morons: a quick look at the Win2k source February 19, 2004

Posted by Owen in : Programming , trackback

Here are some funny comments from the Windows 2000 source code. I haven’t viewed it, of course, but they’re from this Kuro5hin Story. First the embarrassing:

Now, how bad is it?

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.

So despite funny comments, the code isn’t horrible. I didn’t expect it to be horrible, though. You can’t get something as complicated as an operating system to run at all well with awful code.

In short, there is nothing really surprising in this leak. Microsoft does not steal open-source code. Their older code is flaky, their modern code excellent. Their programmers are skilled and enthusiastic. Problems are generally due to a trade-off of current quality against vast hardware, software and backward compatibility.

I’d imagine all but the worst companies can generate decent the code–it seems to me problems occur not in writing code or creating functions that do what they claim, but in problems with the design. In my experience, once you get an idea down (in requirement and design documents) it’s easy to convert the document to code and have each procedure do what it is supposed to do. The problem is that an idea doesn’t necessarily convert to reality. I’ve gone wrong there and I’m sure Microsoft has too. The lesson is to do good prep work–something I’ve certainly learned the hard way in my college career.

Comments»

no comments yet - be the first?