
“We Are Morons” – A quick look at the Win2k source (2004) - sgillen
http://atdt.freeshell.org/k5/story_2004_2_15_71552_7795.html
======
dwightgunning
If, like me, you find these quirks and oddities fascinating, you must keep an
eye on Raymond Chen's blog, The Old New Thing[1].

[1]
[https://blogs.msdn.microsoft.com/oldnewthing/](https://blogs.msdn.microsoft.com/oldnewthing/)

~~~
PeterStuer
I used to love reading his pieces. Then Google killed Reader, I never found a
replacement I liked, and blogs just died for me. Not 'rational', I know, but
I'm sure I'm not alone.

~~~
vog
QuiteRSS. This is a simple Qt application with good usability that does the
job.

Advantages: It's neither a web service that will disappaer tomorrow, nor a
browser extension that ties you to a specific browser.

[https://quiterss.org/en/about](https://quiterss.org/en/about)

Off-Topic: As with most websites, I had to visit an "About" sub page to get to
the description what it does. Why?! Shouldn't this information be the first
you read when you open the main site? It's almost the same nonsense as with
so-called "landing pages". If a company's main site doesn't qualify as landing
page, why do they create a separate sub page instead of just improving their
main site? And some websites don't have any newcomer-friendly sub page at all
- then there's Wikipedia to the rescue.

~~~
rasjani
Single apps might be good replacement for greader app but not really for
greader as a service. For example: i have multiple devices with different
OS’s, some of they had native apps some didn’t but no matter where and how I
used reader, I was always in same state from where I had previously been (read
items and tags).

I’ve personally settled with feedly now but even now after all these years,
it’s not up to par with google reader.

------
blauditore
> While surprisingly informal, there are limits to how far the programmers go.
> There are no derogatory references to Microsoft or Windows themselves. Bill
> Gates is never mentioned. There are no racist or homophobic slurs.

You know, just because someone uses swear words doesn't mean they're racist or
homophobic...

Also, I don't find those comments terrible. If anything, maybe a bit childish.

~~~
psyc
I’m an ex-MS dev and they brought a wave of nostalgia. The hypothesis they
were injected by maligners isn’t needed. We wrote comments like that all the
time, although after this leak they were somewhat discouraged.

~~~
kabdib
There was a simple scanning system called "Policheck" that was introduced in
most source trees; it checked against a list of keywords. It didn't prevent
checkins IIRC, but it flagged files for attention (it's been a while, and I
never personally ran into a policheck hit).

The list included the obvious "dirty" words, and milder words like "idiot" and
"moron". Surprising inclusions were references to the DOJ, the Microsoft
consent decree with the DOJ, and Janet Reno.

~~~
AndrewGaspar
Reading that policheck file was also incredibly educational. I learned all
sorts of exotic curse words I didn't know before. :)

~~~
chocolatebunny
What exotic curse words apply to Janet Reno?

~~~
kabdib
The mere mention of her name was sufficient :-)

------
mv4
I remember downloading the source code in 2004, and promptly receiving a
letter from my ISP stating that I should delete it immediately. I was
impressed.

btw, Microsoft's original reaction to the leak:

[https://news.microsoft.com/2004/02/12/statement-from-
microso...](https://news.microsoft.com/2004/02/12/statement-from-microsoft-
regarding-illegal-posting-of-windows-2000-source-code/)

------
yuhong
For fun, read about ToAscii in
[https://github.com/BlastarIndia/msword/blob/7a66dde071722f6f...](https://github.com/BlastarIndia/msword/blob/7a66dde071722f6fbdd729148a8820e18eaa0bf0/Opus/asm/eldden.asm)

------
intsunny
> private\inet\wininet\urlcache\filemgr.cxx: > // ACHTUNG!!! this is a special
> hack for IBM antivirus software

Why should Microsoft produce a hack for an IBM antivirus product? That IBM
software might be used by a few tens of thousands of people for a few years,
whereas Win2k impacted billions of people and will continue to do so.

At some point it is likely the programmer, PM, and maybe even the bug tracker
behind this code may have moved on, and a newer generation of contributors
will have to waste time understanding the bug, and deciding to support it or
not. Possibly without ever knowing if IBM has fixed their own bug, or still
uses that antivirus software or not.

~~~
mathw
Because Microsoft have long had a reputation (especially at the time) for
maintaining compatibility over a very long period for applications. They did
horrendous engineering to make DOS applications still work through Windows 95
and onwards because their customers still needed it. This was considered an
important thing for the product.

Windows is still one of the most backwards-compatible systems you're ever
likely to encounter. Sure, not everything works anymore, but you can still
install a lot of software written for Windows 95 and expect it to still
function. That's hugely impressive, given that we're not even running the same
kernel anymore.

~~~
yesenadam
>This was considered an important thing for the product.

Backwards compatibility used to be the norm for most stuff, didn't it? In the
80s/90s. You didn't need to get a new computer every few years. Now if there's
a problem, the solution is easy - "Buy a new computer/phone/iPad."

~~~
dingo_bat
> Backwards compatibility used to be the norm for most stuff, didn't it?

I think this seems true only because of Microsoft. I cannot recall any other
major OS spending so much effort on backward compatibility.

~~~
cesarb
> I think this seems true only because of Microsoft. I cannot recall any other
> major OS spending so much effort on backward compatibility.

The king of backward compatibility is probably IBM. AFAIK, their mainframe
operating systems can run unchanged software from before MS-DOS was born.

~~~
wilsonnb
That's true. You can supposedly run a program assembled or compiled in the
60's on a z14 that you buy today.

Seeing as most of IBM's largest customers are banks and other places that have
no interest in rewriting battle tested software, it's probably the reason that
their mainframe department is still alive.

------
Stenzel
At least these guys commented, nowadays the paradigm "Identifiers are
comments" seems to prevail. Technically this might be good, but reading such
code is an experience equivalent to eating unsalted fries.

~~~
mrguyorama
"Self documenting code" often isn't, in my experience

~~~
jonex
On a scale from x to ListOfSinglePeopleWhoHasADogButNoCar I'd say that "self
documenting" code tend to be quite a lot more so than some of the alternatives
I've seen.

However, if someone claims to write self documenting code, and by that think
it's enough to have long variable names and skip comments, then I can
understand the sentiment above coming into existance.

In "identifiers are comments" paradigm the goal isn't only to just skip
comments, but also to structure the code in a way so that it's as clear as
possible what it does and why. This helps much more than a long comment block
hidden somewhere in a big ball of spaghetti code.

Comments aren't a panacea either, as they take effort to write in a helpful
way, often only occurs once (so you'd have to find the place where the purpose
of x is defined) and of course, often are some level of wrong/outdated in
relation to the purpose/function of the code.

Sometimes, it's not possible to write the code in a way that is clear, this
could be for compatibility reasons or performance reasons. That is when
comments really come into their light.

------
PeterStuer
Google cache link for the impatient

[http://webcache.googleusercontent.com/search?q=cache:EhC7uFJ...](http://webcache.googleusercontent.com/search?q=cache:EhC7uFJAGVMJ:atdt.freeshell.org/k5/story_2004_2_15_71552_7795.html+)

------
georgeecollins
I think it is reassuring when I see code where programmers comment that they
aren't doing something the best way. Even when they say it is a "hack" or
because something else is moronic. It shows to me that the engineers know that
not everything in a complex system is beautiful. It is when an engineer is
convinced that every line of a very complex system is completely elegant that
I worry dragons are hiding.

------
favorited
> It's noticeable that a lot of the "hacks" refer to individual
> applications... a Borland compiler came to depend on an existing bug, so
> their fix worked to preserve some of the bug's behaviour

Hyrum's law states: "With a sufficient number of users of an API, it does not
matter what you promise in the contract, all observable behaviors of your
system will be depended on by somebody."

------
mighty_bander
> It would therefore be both hypocritical and meaningless to go through the
> comments looking for embarrassments. But also fun, so let's go.

This is going to be awesome.

------
cjsawyer
Their comment on the “HACK” section seems to indicate that they took “this is
a hack” to mean security vulnerability instead of lazy programming.

------
pjc50
So, what happened to the circulating source? Is it still out there?

~~~
ThinkingGuy
My question is: has anyone ever tried to actually compile the source and
create their own working "unofficial build" of Windows?

Or is this not feasible due to factors that we non-programmers wouldn't
understand?

~~~
mrguyorama
My understanding is that the leaks were not complete source code. The leaks
came from a third party company who was given a significant chunk (but not
all) of the Windows source for development reasons (possibly driver
development?). Can't compile partial code without weird hackery

------
orionblastar
Good web scrape of the old Kuro5hin website before trolls, hackers, and
spammers took over and it eventually got shut down.

~~~
eesmith
Thanks for pointing that out. It felt a bit out of place. It wasn't until
after reading your comment that I noticed the writeup was from 2004.

------
emmelaich
(2004)

Also, hindsight is a wonderful thing.

> _Despite the above, the quality of the code is generally excellent_

------
kalleboo
[2004]

