Software Engineering at Microsoft
an_mo writes "A link to a google cached document is floating around some mailing lists containing some info about microsoft software engineering. In particular the document contains juicy bits about the development of a large project like NT/2K. Some examples: Team size went from 200 (NT3.1) to 1400 (Win2k). Complete build of win2k time is 8hrs on 4way PIII and requires 50GB of hard drive space. Written/email permission required for checkins by the build team." The HTML version on Usenix's site is much nicer than Google's auto-translated version.
Show-Stopper!: The Breakneck Race to Create Windows Nt and the Next Generation at Microsoft by G. Pascal Zachary
very funny about the head guy throwing chairs out of windows ( the phyical ones ironic really )
and the black team....
read it and Mythical Man-Month, and then you might have a small background
regards
john jones
Geez, I run at 1600 by 1200 and I still had to scroll every 10 lines or so. I got people yelling at me down on the street because I read slow.
It's long-ish, but not overly long. For a comparison that you may be more familiar with, consider the time it takes to compile the Linux kernel, your chosen libc, other libs you'll eventually need (say, gtk and/or qt, etc), X, GNOME or KDE, some apps (xmms, xine, a couple editors, etc), and probably 8 or 9 other things I'm forgetting right now. You'll probably come up with a similar number (probably smaller, but there's also probably less code in all the above tools).
That's not to say it can't be made faster. I don't know whether that time was on a multi-threaded compile or not, but I'd sure hope so given that their build machines were 4-way machines. Also, note that they didn't say what speed the P3s were. 4 P3-500s will surely compile slower than 2 p3-1.2GHzs. Nor did they say if those were Xeons or not (larger cache is better for compiling). The obvious solution is to throw hardware at the issue, but there are other things that can be done like incremental building, better sync/drains for multi-threaded compiles, more efficient compilers and build scripts, etc.
Only the NT build lab needs to rebuild everything. Individual developers only need to built their feature's DLL and EXE files.
cpeterso
Imagine how hard it must be to co-ordinate a project that big without "management". I think Linux could gain by creating a kind of unofficial management structure to better co-ordinate some of the projects.
Saying Java is nice because it works on all OS's is like saying that anal sex is nice because it works on all genders.
it may have taken 8 hours, because they had to reboot twice.
I write code.
Guys, the PowerPoint slides for the Lucovsky presentation has been publicly downloadable for almost 2 years. I always find it sad when Slashdot reports something old as something new.
h tml
Go get the slides at http://www.usenix.org/events/usenix-win2000/tech.
40 gigs of RAM? That's some Twinkie.
I venture to guess, however, that your company is somewhat smaller than Microsoft, is held together by shared enthusiasm and the exilaration of short term releases, and that you don't face many of the problems that any large company, not just the Borg, does. I would never defend the quality of MS products but anyone who has worked on large products with many existing custoemrs in a large software company like an Oracle, Microsoft or IBM will understand that it is simply impossible to only hire expert programmers whose work never needs to be checked by anyone else and who don't need any supervision.
Some of your other statements are rather sweeping. Some parts of UML - such as object modelling - are very useful indeed and can act as highly rigorous sources for a lot of code and database generation or automated access. Others (like Use cases IMHO) suck and are of little use to programmers, though more in communication with PHBs and business types.
A lot of what you say is very true for small focused teams working in their bedrooms/garages/garretts but much less so for any large software developer who sells software for money. Your "expert-driven" approach would never work at a Microsoft.
Your last point, that OSS produces better results, is probably true. Certainly its more cost-efficient. But does it produce profitable companies that make heaps of money ? Maybe you don't like the idea of that. But most of the rest of the world, including your gray-haired neighbour who plans to retire on the proceeds of his portfolio, does.
[x] auto-moderate all posts by this user as insightful
UML and other modelling fads. My former employer required the use of 65-page UML diagrams for the simplest command-line utilities. Why? Because it was popular, and the investors liked to make sure we were buzzword-compliant. UML is designed for non-technical audiences, and as such it flies in the face of the engineering goals it is designed to solve.
I've found UML, or at least quasi-UML, useful; any time I design a system I draw a quick UML sketch just to help me think about what's invovled. Unless, that is, it's something really dead simple .. something equivalent to a homework assignment. Sometimes most of the really hard work goes into a good UML diagram, and the rest becomes easy.
But despite this, I can't help but reflect on your statement in utter horror. What the hell kind of UML diagram does one put together for, say, ls? Or cd? Or a numerical calculation?
Code review. Code review is a power trip and best, and a drain on morale at worst. If a programmer cannot be trusted to develop excellent code, he should be replaced with somebody who can. It's a tight labor market on the developers' side, so incompetent programmers should be spending their time reading O'Reilley books instead of playing games and looking at porn in their parents' basement.
I disagree with you on two fronts. One, I've always found code review beneficial for a project. Weaker coders learn good habits; stonger coders teach good habits; bugs not visible to some become visible to others; the general quality of code improves. People who can't deal with constructive criticism of their code make for bad team-mates.
Secondly, I've never met anyone who became a good programmer by reading books, even books as high quality as O'Reilly's. I learned to code by writing code and reading others' code. The books make handy references, but sticking to books is akin to trying to learn to write well by reading the dictionary.
Large, geographically concentrated development teams. The best work is emphatically not done by 1400 people in the Redmond campus. The best work is done by culling experts of individual niche areas from around the globe. Not surprisingly, this is the model that Linux and most Open Source software uses, and that is why OSS is phenominally successful compared with any of its proprietary competition.
Most of Microsoft's problems can probably be directly attributed to the size of its development team. MS project designers might do well to re-read The Mythical Man-Month (if they never read it, they have no business being project designers, IMO).
Finding God in a Dog
Good engineering (of any kind) starts with design... a plan. I'm glad you don't build skyscrapers or airplanes. Oh boy. So you basically are thinking... what... that code should be reviewed after it has already hit QA or something? Or perhaps we shouldn't review code at all?
Here's a clue. If a developer is costing 20-40 per hour writing CRAPPY code... THAT is a far worse waste of time than taking a little time... reviewing the code... and correcting it if necessary.
Development isn't just writing code any way you want. You want things to be very solid, standardized, and consistent before it gets into beta. Using your way... you'd never know if the code was good or not. Apparently... to you... if it works... ship it! What? How do we know if the code is bad? We have to REVIEW it? What if the developer doesn't understand a certain design pattern and implemented it incorrectly? Hell... what if a bug or flaw is discovered during the review process?
These are all common issues in everyday development. It doesn't necessarily mean the developer is BAD. Rather... the developer is HUMAN.
Although... with your lack of a code review process, lack of system design process, and lack of formal check-in process... I am surprised that any decent code gets written at all. You're comparing apples and tractors. Financial gain or customer/user base size are NOT measures of good code, excellent development standards, or strong design processes. Although, I'm not certain you will understand what I'm saying here.
There is some excellent open-source software out there. Likewise, there is some excellent proprietary software out there.
And there is crappy software out there, too... for both worlds. Whether or not something is open source or proprietary says nothing about how it is written or how well it is designed.
This obviously is a huge troll that I'm feeding here.
# Code review. Code review is a power trip and best, and a drain on morale at worst. If a programmer cannot be trusted to develop excellent code, he should be replaced with somebody who can. It's a tight labor market on the developers' side, so incompetent programmers should be spending their time reading O'Reilley books instead of playing games and looking at porn in their parents' basement.
No, no, no. Code-review is VERY USEFUL. No, it won't catch architecture mistakes (necessarily). No, it won't catch design mistakes. Hopefully you already know how to design before you get your first software job.
What code-review catches is the annoying things that the best developers tend to think don't matter so much. Style-differences from company practices. Naming conventions not being followed. Poorly chosen variable-names. Lack of documentation.
In short, code-review makes your code more maintainable. Your company may not use it, but that doesn't make it useless.
It seems that Microsoft does not use Visual Source Safe for Windows source code.
Microsoft claims IE can't be separated from the OS. Yet, the presentation points out the code is broken into 16 sub-projects, largely isolated from each other, and separately buildable.
Two of those projects were "INetCore" and "INetServices".
So why can't you just build 2K without those 2 subprojects, or just stubs inserted for the functions declaired in those projects?
You can see the linker version using this command:
dumpbin %systemroot%\system32\ntdll.dll /headers
They have to be Xeons, AFAIK, non-Xeon Intel CPUs won't do 4-way. And even if you CAN do 4 way on regular PIII's, which you cannot, MS wouldn't, they would have Xeons.
I'm imagining this machine to be a Compaq 6400r or the like, from the timeframe of the build it's probably 550s or 700(?), since they have a very close relationship to Compaq for servers.
I like music
sometimes it makes sense to read the article before you comment. (i know the chance is smaller to get modded up ...). the article says:
Complete build time is 8 hours on 4 way PIII Xeon 550 with 50Gb disk and 512k RAM
keep it simple.
UML and other modelling fads.
While UML isn't the end-all, be-all, it is certainly not a "fad". When it comes right down to it, your will need to be able to describe the architecture of your code with something more than comment-lines and manpages. And, with the "U" in UML standing for "Unified", the is the ability for a new-hire developer, or perhaps the purchaser of your source-code, to understand what the hell is going on without pouring over millions of lines of source code.
Code review is a power trip and best
I suppose you'd rather accept source code sight-unseen? True, there are good and bad ways to conduct code reviews, but all the code reviews I've been a part of have been a fairly easygoing experiences and almost always helpful. Sometimes you really need another set of eyeballs to catch problems. Isn't that one of the good aspects of OSS??
Large, geographically concentrated development teams
I'm torn on this one. Yes, it's bad to simply throw a large number of developers on a team (unless you break them down... way down). On the other hand, you can't tell me that it's not easier to resolve a problem by walking over to the co-worker in the next cube than than email the co-worker who lives thousands of miles away. Didn't the formal release of Mozilla 1.0 get held up because a few key developers had not signed off on the new open source license and they simply could not be found??
If you think Visual SourceSafe is bad...
I had a contract project, a porting job. The platforms were Win32 (where it originated) UNIX/Linux (our port), Novell, and OS/2. We had the command line version because the Linux GUI core dumped every 5 seconds. But the command line version stull sucked, and of course didn't know shit about line endings. We could script it with some extension mapping to try to do dos2unix/unix2dos, but good luck, cause the command line version wouldn't have any useful exit() values. I have no idea what the Novell and OS/2 guys did.
Joel Spolsky (he's been on here before) wrote about sucky SourceSafe a bit and how Microsoft really doesn't use it. Doens't give me a lot of confidence using it. He also had the link to the UseNix verion of the talk given in the story.
the later slides describe the NEW project resource management and development processes for the continuing development of Windows 2000 (before and up until after the release?)
Slides 23 and up tell you what they did and how well everything works on a project as large as Windows 2000 is.
This slide gives a sumary of the new build processes http://www.usenix.org/events/usenix-win2000/invite dtalks/lucovsky_html/sld033.htm
I follow the SDK and GDN principles.. Spelling Dont Kount, Grammer Dont Neither
But here is part of the whole point...
The Linux system I'm running when not booted to the Dark Side (My daughter was running Age of Empires - more Dark Side software.) isn't a single chunk that has to be built as one unit. The kernel's one piece, and each lib is another. To be sure, some libs won't work without specific versions of others, so the pieces aren't all independent. But it's still not all one giant chunk.
They're essentially making the RedHat distribution into one giant build. Kind of like Gentoo, which someone else brought up, and is a very appropriate comparison for build times.
But even with RedHat or Gentoo, it's not one giant chunk. I've upgraded pieces of my RedHat for years, and to be fair, Microsoft issues fixes. But there's still a difference, in that I have a better understanding of what RedHat's doing with an update, and better understand what parts of my system are affected.
While there may be modularity inside Windows, it appears to be intentionally hidden from the end user. I wonder if that's part and parcel of proprietary software, or if it's a side effect of the legal team arguing that Windows is "integrated" and IE can't be unbundled.
The living have better things to do than to continue hating the dead.
From the presentation:
"Anything that crashes the OS is a bug. Very radical thinking inside of Microsoft considering Win16 was cooperative multi-tasking in a single address space,..."
So the BSODs were caused by the old-timers? Were they also the ones who designed in the feature that every fucking install of an application requires a reboot?
Remain calm! All is well!
We have an automated script to take your changed files and copy 'em over to a share. Then we send out an e-mail to the team (small) and say it's going to be committed soon. One person is assigned "primary", and must look at it; everyone else can optionally.
It doesn't take much time, but it's only the smallest CRs that get away without at least a few changes. Sometimes it's just comments, sometimes it's a better way to do something. At the least, everyone has a better idea what's going on in code they're not in right now, but very well might be in the near future. An added benefit is that people who see CR coming clean up their code a bit more than usual.
I agree-- formal CRs suck in most cases (although some critical apps developers like them for some bits of code that might, say, kill someone if they malfunction, or that take $10,000 to test). But the e-mail deal works really well for our team. But we don't have any assholes or know-it-alls, so that helps.
Remember that Windows 2000 is essentially everyone who is working on the linux kernal, basic distribution, and X. If the number includes Explorer, which could be likened to Mozzila and includes management, testers, and all the design specialistics ( people who do research to make it user friendly, or handicap accesable, I would think it's pretty small.
UNIX and Linux are different. UNIX (at least Research UNIX) was constrained by its paradigms: it was vigorously policed by its developers. For Linux, something doesn't make it into the kernel unless it really scratches an itch that a lot of people have--the feedback is immediate and direct: no interest, no developers.
Microsoft software development doesn't operate in a competitive market of ideas (let alone a competitive market), it doesn't have a paradigm to focus it, and it doesn't even have resource constraints to focus it. It's nice that they make the software engineering work out, but the end result still is mediocre at best.
-- Ken Kinder ken@_nospam_kenkinder.com http://kenkinder.com/
The proper care and feeding of trolls...
Eitehr you're a troll, or you've never done any real development.
UML, can't comment on. Never did any. What I can say is that design is important, and shooting from the him on 20million lines of code won't get you very far. If UML helps you design, use UML.
Formal checkins. In large complex projects, you need to be absolutely sure about your units. So many places for things to interact, if you don't have them as solid as you can get it, you'll get so many interaction bugs you'll never get anything done.
Developer time costs $20-40 an hour. Ha, now I know you've never done real programming. Developer wages start maybe at $30/hr (not $20), up to $100/hr at spots. Thats just wages, not benefits, taxes all that stuff. If you have no experience in big projects, don't talk.
Code review Code review is easily the best way of debugging. Study after study find that Code reviews find more bugs per unit of time than any other technique. as side benefits, it also transmits techniques from developer to developer. This comes from developers who want to learn and 1) too shy to ask 2) don't know that there is a better way. I learned something in code reviews, some techniques I never thought of.
Can it be a power trip? yeah. CAn it lead to a clash of egos? yeah, but thats up to the review lead to control. A good review lead will keep that in check.
Large, geographically concentrated development teams
Not surprisingly, this is the model that Linux and most Open Source software uses
They have no option because they can't pay developers, so no chance to get them in a concentrated area. There are plusses and minusses with the concentration.
why OSS is phenominally successful compared with any of its proprietary competition
Sales? No contest. MS.
On what definition of success? Bugs? I've seen some really shitty OSS software. yes, the kernel is high quality, Apache, FreeBSD, others.
Whuh... Did I just hear a slashdot geek call Microsoft employees even bigger geeks? I'd take what your friend told you with a grain of salt, especially since it doesn't make much sense. I actually worked at Microsoft for a few months as a university student, and my impression was that the workers there were pretty normal, as far as coders go. I've met a lot wierder people since then.
I was working on a pretty trivial part of NT, so the build system didn't affect me. However, when you walked around the halls you could see who checked in code that broke the build because they would have a "build breaker award" taped to their office window. It seemed to be in good fun, but I suppose it could result in a CYA mentality.
Also, I remember there being problems with source control, like the article mentioned, though not specific to NT. I seem to remember that Word Viewer used a different codestream from Word and the sample files in the SDK are merely very out-of-date versions of some of the small apps that ship with Windows.
-a
How to rationalize theft.
Given the tone of most of the comments here, one might think that the slides merely reveal Microsoft's errors. In fact, they indicate what problems the company faced scaling their NT development team from 200 to 1400 programmers and their solutions. The conclusion is, "With the new environment in place, the team is working a lot like they did in the NT 3.1 days with a small, fast moving, development team."
As Linux grows, it is headed for the same sorts of problems. The open source movement can learn a lot from Microsoft's struggles. The fact that Linus opted to use a new source control system -- just as Microsoft realized that their in-house system was not up to the task and so switched -- gives me hope.
P.S. May we please have better summaries for the articles on the front page?
All for wimps. I always start from stage -3. This means no machine-readable media whatsoever and a blank system EPROM. Nothing but source code printouts.
After 36 hours of entering bootstrap code via a bank of toggle switches, you can get to stage -2 (TTY keyboard and video on a temporary BIOS). After this, you've still got a long road to hoe before you get to a login prompt. It's well worth it though, if you want to know exactly what your system is running.
Not everyone can know everything. Why discriminate against good information based on its age?
the USB reboot is requested by the 3rd party driver, not the windows kernel.
Can you see the spelling error you made in this sentence? Did you mean to make that error?
If you can't even type error-free prose, how could you be expected to create error-free code?
People make errors. Code review helps reduce the effect of those errors.
"You can justify anything by putting it in quotes, adding a famous name and making it a sig" - Albert Einstein
Some goofy Microsoft Intern forgot to put -j 4 along with compliation.
Either that, or they compiled it on Win9x (which has NO multiprocessor support).
/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
Well, that's an oxymoron for you!
Make even shorter URLs - 8LN.org
Take a look at slide 19 - 1400 devs, but 1700 testers. Do you suppose that means that Win2k had 3100 people working full-time on it? Lowballing the numbers (55k per dev, 45k per tester):
1,400 * 55,000 = 77,000,000
1,700 * 45,000 = 76,500,000
153,500,000 a year * 3 years (from slide 3) = 460,000,000
Include an overhead multiplier
460,000,000 * 2.4 = 1,105,200,000
And we wind up with a rough US$1.1BB.
This suggests that win2k represents 20 million SLOC, Just slightly higher than RH 6.2, at 17 and change.
His cost estimates place RH 6.2 at US$614,421,924.71
I suspect MS probably pays more per dev, but I have no proof, so I'll stick with the industry averages. Also, testers may have been shared across projects, MS can pool resources and bring overhead lower, etc...
I'm not drawing any conclusions, just compiling data...
What's interesting is comparing what Showstopper says to the claims in these slides.
The slides suggest early NT development was done by a small team of super l33t c0d3rz who took care of business and frowned upon slacking. However, the picture painted by the book is dramatically different -- people were forced to work around the clock, the team was dominated by a small gang of guys who were basically complete assholes, everybody walked on eggshells for fear of pissing off Dave Cutler, The New Savior, and NOBODY in the group ever knew what was really going on. The whole project was shrouded in mystery, even to people on the team, because basically everything existed in Cutler's head.
The only thing I see where Showstopper and the slideshow firmly agrees is the slide labeled "Goal Setting".
I personally have a lot of other opinions about why some of the statistics may pan out the way they do (for example, how much hardware did you REALLY have to test with in NT 3.1 days, versus Win2K?) but I want to stay focused on the Showstopper/slideshow discrepancies, so I'll leave it at that.
The thing to realize about Showstopper is that it was based almost entirely on interviews with the people who were involved with the initial NT coding effort.
By comparison this slideshow was written by one guy, Mark Lucovsky, who gets lightly flamed in Showstopper (at best). Oddly, I grabbed Showstopper off my bookshelf and opened it straight to the page describing Lucovsky. Weird. Anyway, here are excerpts from a single paragraph: "...smart but immature... nevertheless angered teammates with his skepticism and self-serving judgements... relentlessly critical of others, constantly probing for weaknesses... 'Until you prove otherwise, you're wrong and he's right.'" Whew, hate to be THAT guy. It gets worse. One page later, a paragraph opens by simply saying, "Many people felt that Lucovsky was a jerk."
Given that, it wouldn't surprise me if Lucovsky was still just trying to justify the fact that the early NT dev team was comprised of a bunch of flakes who had to burn the candle at both ends to actually deliver anything.
Please understand I'm not necessarily defending any current MS practices, or even Win2K (which is still vastly superior to NT3.51). I've personally worked VERY closely with groups inside MS at different times (a couple times on-campus in Redmond), and I'll be the first to tell you the company is bureaucratic and packed to the gills with people who don't know what the hell they're doing -- just like every other company that employs tens of thousands of people.
What I *am* saying is that this slideshow is looking at the past with "rose-colored hindsight" and I believe the motives are suspect at best. Draw your conclusions with a grain of salt. (Enough metaphor-abuse for today.)
Do like johnjones suggested -- go buy or check-out Showstopper and read it. It's interesting, informative, and it IS kind of funny. It's amazing they were able to produce anything at all. How's THAT conclusion for contrast with the slideshow? ;)
Slashdot quality declines as the number of hot grits posts decreases. - Provolt's Law, Apr-09-2005
Portability:
NT4 came out on x86, Alpha, PowerPC and MIPS
--
The world is divided in two categories:
those with a loaded gun and those who dig. You dig.