Windows Revealed (from: Wes)

It looks like that I made someone queasy at Microsoft in my last post “Windows Source Code,” which describes Microsoft’s gradual opening up of its crown jewels. I changed the title to more accurately reflect the post, “Microsoft Opening Up Windows Source Code.”

Anyway, I thought I would have some fun and reveal millions of lines of Windows code in this post:

1) Windows (and coincidentally Office) rely heavily on millions of lines of code starting with open curly braces. Curly braces are essential for these popular software packages to deliver their rich functionality.

    {

2) Of course, for each one of the millions of lines with open curly braces, there needs to be a matching line with a close curly brace, otherwise the code won’t compile.

    }

3) Windows makes use of millions of blank lines sprinkled throughout the source code. Effective use of blank lines separates distinct blocks of code and increase code readability and maintainability. The net result is a product with fewer bugs; Microsoft could probably use more blank lines.

<blank line>

4) For authenticity, I also included a Microsoft copyright notice from Rotor.

//    Copyright (c) 2002 Microsoft Corporation.  All rights reserved.

I avoided lines containing expletives to avoid damaging the softwaremaker’s reputation. Altogether, these four blocks of code represent maybe 15% of the lines in Microsoft’s code base. Microsoft claims that Windows is over 100 millions of lines of code, so this would mean I have just revealed over 15 million lines of proprietary Microsoft code.

Of course, many of you reading this may see striking parallels between Windows code and your own code, but I assure you that any similarities are purely coincidental.

Comments are closed.