This great K5 article dissects the code and comments from the leaked source-code to Win2K. The conclusion: the code is pretty good, and the comments are an illumnating, NC-17 journey through the frustrations of working on giant code-projects that drag long tails of legacy code behind them.
In some cases, the programmers themselves appear to have been frustrated or surprised.
private\ntos\w32\ntuser\kernel\mnpopup.c:
// Set the GlobalPopupMenu variable so that EndMenu works for popupmenus so
// that WinWart II people can continue to abuse undocumented functions.private\windows\shell\accesory\hypertrm\emu\minitel.c:
// Guess what? Latent background color is always adopted for mosaics.
// This is a major undocumented find...private\windows\shell\accesory\hypertrm\emu\minitelf.c:
// Ah, the life of the undocumented. The documentation says
// that this guys does not validate, colors, act as a delimiter
// and fills with spaces. Wrong. It does validate the color.
// As such its a delimiter. If...