<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Buggin' My Life Away : History</title><link>http://blogs.msdn.com/rick_schaut/archive/tags/History/default.aspx</link><description>Tags: History</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>The History of Mac Office, Part I</title><link>http://blogs.msdn.com/rick_schaut/archive/2006/06/03/616209.aspx</link><pubDate>Sat, 03 Jun 2006 22:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:616209</guid><dc:creator>Rick Schaut</dc:creator><slash:comments>13</slash:comments><comments>http://blogs.msdn.com/rick_schaut/comments/616209.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rick_schaut/commentrss.aspx?PostID=616209</wfw:commentRss><description>&lt;p&gt;We've all seen the scene.  A group of people are having a discussion about something, and one older, and allegedly wiser, person has been sitting back just letting the discussion ramble on, until they meet some sort of impasse, at which point everyone turns to this older, and allegedly wiser, person for the answer to some obscure question.  A pregnant pause ensues while this older, and allegedly wiser, person ponders the situation.  The pondering thought is, more often than not, something along the lines of, "How the hell did I get myself into this?"&lt;/p&gt;

&lt;p&gt;Well, in a sort-of, kind-of, almost way, we've enacted this little scene out in the bloggosphere.  Erik Schwiebert wrote about some &lt;a href="http://www.schwieb.com/blog/2006/06/02/a-brief-history-of-mac-office/"&gt;past changes&lt;/a&gt; to the tool sets we've used to build various versions of Office, and closes his post with:&lt;/p&gt;

&lt;p&gt;&lt;blockquote&gt;I don’t know what tools were used on versions of Mac Office prior to Office 98 (Rick Schaut would know about Word 5.1 and Word 6). MPW? Maybe, but that would have been a &lt;b&gt;really&lt;/b&gt; long time ago! [Emphasis &lt;b&gt;not&lt;/b&gt; added.]&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;Thanks, Schwieb!  You've given me another item I can add to my "You know you're getting old when..." list.&lt;/p&gt;

&lt;p&gt;Enough self-flagellation.  Someone with the nom de plume of "odysseus" left this crumb at the end of Schwieb's post:&lt;/p&gt;

&lt;p&gt;&lt;blockquote&gt;You haven’t mentioned anything about the fact that Mac Office versions all the way through Office 2001 were written in a mid-level interpreted language called “pcode.” Was that a consequence of using MSVC4?&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;Earlier versions of Microsoft's applications were &lt;i&gt;compiled to&lt;/i&gt; a mid-level interpreted language.  They weren't written in that language.  They were still written in C with some hand-coded assembly where speed was crucial.&lt;/p&gt;

&lt;p&gt;The term "P-Code" is based on the UCSD P-System, where the "P" stands for "Pseudo".  In many ways, it was a precursor to the Java run-time and the .NET CLR.  Code was compiled to run on a pseudo-machine, and you implemented this pseudo, or virtual, machine on the various systems where you wanted to run your code.  We were supposed to get easy portability that way, but that was back in the time when operating systems basically gave applications a way to talk to the file system and nothing else.  Since then, massive API differences have accrued to each of the various systems such that the CPU is no longer the primary issue when porting code from one system to another.&lt;/p&gt;

&lt;p&gt;At this point, I'm going to have to digress a bit for the non-programmers who are reading this.  The most important tool in a programmer's toolset isn't the compiler.  It's not even the editor, despite the constant religious battles between proponents of the various editors in existence.  Rather, the most important tool in a programmer's tool set is the debugger.  That tool is the one that allows us to monitor the execution of the code we write.  It's how we find where the code is wrong so we can fix it.&lt;/p&gt;

&lt;p&gt;Now, there are different kinds of debuggers, but we can generally break them down into two categories: source-level and low-level.  A low-level debugger only shows you the machine code that your compiler generated.  A source-level debugger shows you the source code you wrote for the code that's currently being run by the computer.&lt;/p&gt;

&lt;p&gt;The rest of the tale isn't quite so much about compilers.  It's about debuggers.  One of those debuggers will be familiar to old Mac hats: MacsBug.  It was a low-level debugger.  The other debuggers are more closely tied to the compilers we used.  So, back to our tale.&lt;/p&gt;

&lt;p&gt;Before we started using MSVC, we were using another internal compiler that ran on DOS (we're talking before Windows here).  Folks who were around before 1990 also remember that it was very difficult to get a PC to talk to a Mac, so we used to have to connect our PCs to our Macs using SCSI cables.  The P-Code debugger, which was a source-level debugger, ran on DOS, and talked to the Mac over the SCSI cable.&lt;/p&gt;

&lt;p&gt;This had some unfortunate consequences.  For example, you couldn't use the P-Code debugger and MacsBug at the same time.  The P-Code debugger used a polling mechanism to determine if the P-Code interpreter was still running on the target Mac.  Imagine a phone conversation.  When you dropped into MacsBug, it was like the P-Code interpreter had lost the signal on the cell phone.  The P-Code debugger would hang on for a short while waiting for the signal to come back, but it wouldn't take very long before the P-Code debugger would hang up the phone.&lt;/p&gt;

&lt;p&gt;If you're starting to see visions of bear skins and stone knives, then your understanding of the situation isn't very far off the mark.  But, it gets worse.  For Mac Word 5.x, we implemented some of the features as plug-in code resources.  These features included all of the proofing tools and the drawing tool in Word 5.x (known then as "Subdraw").  We built these plug-ins using Think C.&lt;/p&gt;

&lt;p&gt;Think C had its own debugger, but that debugger didn't have a clue about P-Code.  So, now we're using two different compilers, and three different debuggers.  And, one of those debuggers is completely useless.  Yuk!  Throw loadable code resources into the mix, and you have an absolute mess.&lt;/p&gt;

&lt;p&gt;One of the features of a debugger is the ability to set a breakpoint.  A breakpoint is a location in the code where the debugger will pause the program kind of like hitting the pause button on a VCR or a DVD player.  Once your program is paused, you can then examine the program's execution in more detail.&lt;/p&gt;

&lt;p&gt;But loadable code resources are a problem.  One of the reasons for using a code resource is the fact that it doesn't always have to be in memory.  On a Mac that has only half a MB of RAM, being able to kick some code out of memory is a very useful feature.  This feature, however, makes debugging a plug-in exceedingly difficult.  You can't set a breakpoint in a code resource until it's loaded into memory.&lt;/p&gt;

&lt;p&gt;So, let's summarize the situation.  We have pieces of code built by two different compilers, neither of which understand the other.  The debugger with Think C is completely useless, because it hasn't a clue about the main program that's running, which means the only way we could debug, say, the grammar checker was using MacsBug.  But, every time we dropped into MacsBug, the P-Code debugger would whig out.&lt;/p&gt;

&lt;p&gt;Those of you who've seen me in person now know that the thinning hair on the top of my head is not entirely due to male pattern baldness.  By comparison, MSVC was heaven.&lt;/p&gt;

&lt;p&gt;One last little tidbit: Back when we were using MSVC, someone had written two little programs, called victory.exe and defeat.exe.  Each of them played two octaves of the C-Major scale through the PC's speaker.  Victory.exe played the notes in ascending order, and defeat.exe played the notes in descending order.  When your builds succeeded, the build system would run victory.exe, and when your builds failed, it would run defeat.exe.  The cool part about that is you didn't have to keep watching your computer to see if the build had finished.&lt;/p&gt;

&lt;p&gt;When we moved from MSVC to CodeWarrior, we lost this ability to play some custom sound.  But, XCode has this feature.  If you have XCode installed, type "defaults read com.apple.XCode | egrep Sound" in your terminal window to see if these are set.  This sent me down a rather amusing path.&lt;/p&gt;

&lt;p&gt;Because we're porting quite a bit of code from Win Office so we can support the new file formats, we have our own Win Office build machine set up in our lab (where we connect to the machine using Remote Desktop Connection).  And, feeling a bit nostalgic, I decided to rummage around in their build system to see if they still had those sounds.  Well, they have a couple of .wav files, but they're not the same sounds.  In particular, the sound for a build failure is about a 15 second montage of Homer Simpson uttering his famous "Doh!" with various inflections.&lt;/p&gt;

&lt;p&gt;I played this, and laughed a bit.  Then it occurred to me that, as I had been setting this Win Office build machine up, the first couple of times I tried to build Win Office, the builds failed.  I hadn't gotten the setup quite right yet.&lt;/p&gt;

&lt;p&gt;I wonder if anyone was in the lab when one of those builds failed...&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Rick&lt;/p&gt;

&lt;p&gt;Currently playing in iTunes: &lt;i&gt;Life Before Insanity&lt;/i&gt; by Gov't Mule&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=616209" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/History/default.aspx">History</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Mac+BU/default.aspx">Mac BU</category></item><item><title>A Ghost from Mac World Past</title><link>http://blogs.msdn.com/rick_schaut/archive/2006/01/18/514734.aspx</link><pubDate>Thu, 19 Jan 2006 10:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:514734</guid><dc:creator>Rick Schaut</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/rick_schaut/comments/514734.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rick_schaut/commentrss.aspx?PostID=514734</wfw:commentRss><description>&lt;p&gt;As many people at Mac World pointed out to me, I've been rather silent lately.  There's a reason for that.  Of the stuff that's on my mind lately, there just isn't a whole heck of a lot I can discuss publicly.  Even telling you some of what I did at Mac World this year strays too closely to the realm of forbidden discourse.&lt;/p&gt;
&lt;p&gt;So, I'll just relate a story from Mac World past. Right after we shipped Office 98, Ben Waldman decided to take us out to dinner at &lt;a href="http://cityguide.aol.com/sanfrancisco/entertainment/venue.adp?sbid=100946792"&gt;Fleur de Lys&lt;/a&gt; during that year's Mac World. Neat idea, except that I didn't get the e-mail telling us that this place is jacket-and-tie only until I was sitting in my hotel room at the ANA (now the Argent). Great!  Now, what do I do?&lt;/p&gt;
&lt;p&gt;Well, the dinner was Tuesday night, and I was scheduled to do booth duty Tuesday afternoon.  Nordy's is just around the corner, and I was pretty certain I'd be able to get any alterations done by that evening, so I ducked in.  Being pressed for time, I didn't pay close attention to prices.  I was rather more concerned with whether or not the clothes actually fit.&lt;/p&gt;
&lt;p&gt;There was a rack of items on sale, so I figured I'd be OK so long as I chose items from the rack.  Everything there was, indeed, on sale, including the rather nice Harris tweed jacked I'd picked out, which turned out to be &lt;em&gt;sale&lt;/em&gt; priced at $500.00 &lt;em&gt;off&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Of course, I hadn't noticed that this jacket was &lt;em&gt;sale&lt;/em&gt; priced at $500.00 &lt;em&gt;off&lt;/em&gt; until we'd finished all the measurements, chalked all the lines and I was standing at the cash register with credit card in hand.  At that point, it was either scratch the whole idea of dinner at Fleur du Lys or buy the jacket.  So, I bought the jacket.  It's still the most expensive item of clothing in my wardrobe.&lt;/p&gt;
&lt;p&gt;There's always some kind of dinner thing at Mac World.  This year, we had dinner, with some MVP's and members of the customer council, at &lt;a href="http://cityguide.aol.com/sanfrancisco/entertainment/venue.adp?sbid=100946792"&gt;Frisson&lt;/a&gt;, where the food was just as good as the food we'd had at Fleur du Lys, and it didn't cost me a tie and a jacket.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Rick&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I neglected to mention running into &lt;a href="http://www.nisus.com/blogs/index.php?cat=10"&gt;Dave&lt;/a&gt; at the Nisus booth.  There was customer there who was asking about Nisus.  He said he'd bought Word, even though he didn't want to, because Word had the features he needed.  The customer then turned, looked at me, and saw the Word icon on my shirt, at which point Dave burst out laughing.  I patted Dave on the back, asked him if he was OK, and offered to get him some water.  Check out Dave's blog.  He has some good comments on stuff found on the Mac World floor.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Life&lt;/strong&gt; from the album "Songs In A Minor" by &lt;a href="http://www.google.com/search?q=%22Alicia%20Keys%22"&gt;Alicia Keys&lt;/a&gt;&lt;/p&gt;

&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=514734" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/History/default.aspx">History</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Personal/default.aspx">Personal</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Mac+BU/default.aspx">Mac BU</category></item><item><title>Another Win Office Blogger</title><link>http://blogs.msdn.com/rick_schaut/archive/2005/11/15/493246.aspx</link><pubDate>Wed, 16 Nov 2005 07:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:493246</guid><dc:creator>Rick Schaut</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/rick_schaut/comments/493246.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rick_schaut/commentrss.aspx?PostID=493246</wfw:commentRss><description>&lt;p&gt;The list of &lt;a href="http://blogs.msdn.com/rick_schaut/archive/2005/10/03/476480.aspx"&gt;Win Office 12 bloggers&lt;/a&gt; is growing.  The latest addition is &lt;a href="http://blogs.msdn.com/willkennedy/default.aspx"&gt;Will Kennedy&lt;/a&gt;, who is the general manager of the Outlook team.&lt;/p&gt;

&lt;p&gt;Will's a former Word developer.  Before that, Will was an intern on the Mac Word 5.0 project.  Back in those days, we would occasionally "name" some of our testing releases--an effect carried out by changing the string that was used for new untitled documents in the debugging build.  When you started up Word, the window title for a new, untitled document might, for example, be "FearAndLoathing1" (for the Fear and Loathing release) instead of "Document1".&lt;/p&gt;

&lt;p&gt;When Will's internship was finished, we did a WillKennedy release, and, for a week, new, untitled documents would come up with "WillKennedy1" for the window title.  As far as I know, Will's the only person to have had a testing release of Mac Word named after him.&lt;/p&gt;

&lt;p&gt;Stop by, and say, "Hi" to Will.  While you're at it, tell him how many &lt;i&gt;customer&lt;/i&gt; accolades he'd receive if he went back to working on Mac Word.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Rick&lt;/p&gt;
&lt;p&gt;Currently playing in iTunes: &lt;i&gt;Wish You Were Here&lt;/i&gt; by Pink Floyd&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=493246" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/History/default.aspx">History</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Other/default.aspx">Other</category></item><item><title>Dave Luebbert on Channel 9</title><link>http://blogs.msdn.com/rick_schaut/archive/2005/11/13/492262.aspx</link><pubDate>Sun, 13 Nov 2005 19:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:492262</guid><dc:creator>Rick Schaut</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/rick_schaut/comments/492262.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rick_schaut/commentrss.aspx?PostID=492262</wfw:commentRss><description>&lt;p&gt;What was the Ray Gram Memorial Feature that shipped in Apple's System 7?  Who invented the combo box (drop-down edit control)?  What was the real downfall of WordPerfect?  What was the project code name for Mac Word 5.0, and why?&lt;/p&gt;

&lt;p&gt;You'll find answers to these questions and more in this &lt;a href="http://channel9.msdn.com/showpost.aspx?postid=135619"&gt;Channel 9 interview&lt;/a&gt; of &lt;a href="http://www.songtrellis.com/"&gt;Dave Luebbert&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Dave Luebbert worked on Mac Word 1.0, Mac Word 3.0, Mac Word 4.0 and was the development lead on Mac Word 5.0.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Update:&lt;/b&gt; I just got some mail from Dave correcting my spelling of Ray's name (thanks Dave).  Dave also pointed out that Ray attended the University of Wisconsin Milwaukee at nearly the same time I did.&lt;/p&gt;

&lt;p&gt;Come to think of it, the last time I ran into Ray was at General Mitchell Airport in Milwaukee during some holiday season a few years back.  One of these days, I'll have to look him up, and we can reminisce about stuff like the Safe House and Ma Fischer's.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Rick&lt;/p&gt;
&lt;p&gt;Currently playing in iTunes: &lt;i&gt;Famous Alto Break&lt;/i&gt; by Charlie Parker&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=492262" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/History/default.aspx">History</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Microsoft+Word/default.aspx">Microsoft Word</category></item><item><title>Gettin' Published</title><link>http://blogs.msdn.com/rick_schaut/archive/2005/06/22/431529.aspx</link><pubDate>Wed, 22 Jun 2005 17:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:431529</guid><dc:creator>Rick Schaut</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/rick_schaut/comments/431529.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rick_schaut/commentrss.aspx?PostID=431529</wfw:commentRss><description>&lt;p&gt;Well, APress is &lt;a href="http://www.apress.com/book/bookDisplay.html?bID=453"&gt;advertising it&lt;/a&gt;, and Amazon is &lt;a href="http://www.amazon.com/exec/obidos/tg/detail/-/1590595009/103-0171906-4058228?v=glance"&gt;taking orders for it&lt;/a&gt;, so I suppose I can now publicly revel in the fact that &lt;a href="http://www.joelonsoftware.com/"&gt;Joel Spolsky&lt;/a&gt; selected my essay on &lt;a href="http://blogs.msdn.com/rick_schaut/archive/2004/02/26/80193.aspx"&gt;Mac Word 6&lt;/a&gt; for his collection of essays, &lt;i&gt;The Best Software Writing I, Selected and Introduced by Joel Spolsky&lt;/i&gt;.  Props go to Derek Miller at &lt;a href="http://www.penmachine.com/"&gt;Pen Machine&lt;/a&gt; for nominating the essay in the first place.&lt;/p&gt;

&lt;p&gt;Back in October, I'd noticed that Derek had nominated the essay for Joel's book.  At the time, I felt honored, but didn't really think it would be selected.  I was rather surprised when, a couple of months ago, Joel contacted me for permission to publish it.&lt;/p&gt;

&lt;p&gt;I don't think of myself as a writer.  Though people have told me that I should write more often, most of them have been members of my family or close friends.  I'd mostly chalked that sort of thing up to unmitigated bias and moved on.  Yet, almost simultaneously with Joel's request to publish my essay on Mac Word 6, I got a completely unrelated offer from a small publisher about writing a book.&lt;/p&gt;

&lt;p&gt;Unfortunately, regardless of how my self-image might change because of this, it's still very hard to figure out when I'd actually have time to do some serious writing.  For the foreseeable future, I'm going to be head-down getting Mac Word up to speed on the new XML-based file formats we just announced.  After that, there's a lot of work to be done investigating universal binaries.&lt;/p&gt;

&lt;p&gt;Who knows?  Maybe I'll sit down and do some writing after Mac Office 12 ships.  Still, I get the feeling that there's going to be some other issue with Mac Word that I won't want to let drop.  After all, I've asked myself a variation of this same question following the completion of the previous 6 major releases of Mac Word, and I'm still doing this.&lt;/p&gt;

&lt;p&gt;By the way, Joel, I do have a nice home, but it's in Woodinville not on Mercer Island; my mother is probably much more fond of the condo in Bothell than she would have been of a loft in Seattle; I rather doubt that anyone would mistake my Acura sedan for a Bently convertible; and we just sold the big boat.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Rick&lt;/p&gt;
&lt;p&gt;Currently playing in iTunes: &lt;i&gt;Savor/Toussaint L'Overture&lt;/i&gt; by Santana&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=431529" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/History/default.aspx">History</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Personal/default.aspx">Personal</category></item><item><title>Big Dave (Which One?)</title><link>http://blogs.msdn.com/rick_schaut/archive/2005/06/13/428778.aspx</link><pubDate>Tue, 14 Jun 2005 07:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:428778</guid><dc:creator>Rick Schaut</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/rick_schaut/comments/428778.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rick_schaut/commentrss.aspx?PostID=428778</wfw:commentRss><description>&lt;p&gt;&lt;a href="www.scripting.com"&gt;Dave Winer&lt;/a&gt; provided this &lt;a href="http://geeks.opml.org/stories/storyReader$90"&gt;link&lt;/a&gt; to an article posted by Dave Luebbert. Dave Luebbert was the development manager for Mac Word 5.0, and was my first boss at Microsoft.&lt;/p&gt;

&lt;p&gt;Dave (L) is an incredible guy.  He's a musician, and a very big fan of Jazz.  He's been working on a music composition program (&lt;a href="http://geeks.opml.org/stories/storyReader$90"&gt;Song Trellis&lt;/a&gt;) for as long as I can remember.&lt;/p&gt;

&lt;p&gt;I learned a lot from Dave, not all of it related to developing software.  You can, too, if you follow the link above.  I highly recommend his article.&lt;/p&gt;

&lt;p&gt;As for which "Dave" is "Big Dave"?  Well, Dave L is no small guy.  We had another Dave who worked on the Mac Word 5.0 project.  He wasn't a little guy either, but Dave L still got the moniker "Bid Dave."  I suppose one could say that Dave Winer is "big" in many ways, but Dave L will always be "Big Dave" to me.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Rick&lt;/p&gt;
&lt;p&gt;Currently playing in iTunes: &lt;i&gt;Famous Alto Break&lt;/i&gt; by Charlie Parker&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=428778" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/History/default.aspx">History</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Microsoft+Word/default.aspx">Microsoft Word</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Other/default.aspx">Other</category></item><item><title>MPW C Error Messages</title><link>http://blogs.msdn.com/rick_schaut/archive/2005/04/01/404529.aspx</link><pubDate>Fri, 01 Apr 2005 13:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:404529</guid><dc:creator>Rick Schaut</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/rick_schaut/comments/404529.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rick_schaut/commentrss.aspx?PostID=404529</wfw:commentRss><description>&lt;p&gt;Those of us who've been programming the Mac for a few years have some fond memories of the old Macintosh Programmer's Workbench (MPW). It was very much like the Terminal Window on OS X, but had a few quirks of its own.&lt;/p&gt; &lt;p&gt;Among those quirks were the error messages that the C compiler would give you for certain errors. Messages like, "a typedef name was a complete surprise to me at this point in your program," and "String literal too long (I let you have 512 characters, that's 3 more than ANSI said I should)" almost made you want to write broken code just to see what the compiler had to say.&lt;/p&gt; &lt;p&gt;The most complete list of the error messages I could find is &lt;a href="http://www.effect.net.au/lukastan/humour/Computing-Software/Error-Messages-Mac.txt"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Well, rumor has it that there's a skunk works at Apple who are busy porting some of these error messages into XCode 2.0. And they say that Apple have lost their sense of humor...&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;Rick&lt;/p&gt; &lt;p&gt;Currently playing in iTunes: &lt;i&gt;Won't Get Fooled Again&lt;/i&gt; by The Who&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=404529" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/History/default.aspx">History</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Programming/default.aspx">Programming</category></item><item><title>From Bravo to Word</title><link>http://blogs.msdn.com/rick_schaut/archive/2004/06/20/160368.aspx</link><pubDate>Sun, 20 Jun 2004 09:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:160368</guid><dc:creator>Rick Schaut</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/rick_schaut/comments/160368.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rick_schaut/commentrss.aspx?PostID=160368</wfw:commentRss><description>&lt;html&gt;
&lt;html&gt;

&lt;head&gt;
&lt;title&gt;From Bravo to Word&lt;/title&gt;
&lt;/head&gt;

&lt;body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'&gt;

&lt;div class=Section1&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Not long after the Wired article about &lt;a
href="http://wired.com/news/mac/0,2125,63848,00.html"&gt;Word 5.1&lt;/a&gt;, someone
sent me a link to this &lt;a
href="http://wiredblogs.tripod.com/cultofmac/index.blog?entry_id=344456"&gt;post&lt;/a&gt;
on the &lt;a href="http://blog.wired.com/cultofmac/"&gt;Cult of Mac Blog&lt;/a&gt;.  It
mentions what I had thought to be a rather widely known fact: that most of the
people who first worked on Word came from the Xerox PARC.  In fact, the one
person most responsible for most of the design ideas that permeate Word is
Richard Brodie who also worked on Bravo while at the Xerox PARC.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Not surprisingly, a number of ideas that were first explored in Bravo found
their way into Word.  The Cult of Mac mentions the file format, but the
statement that&amp;rsquo;s quoted isn&amp;rsquo;t quite accurate&amp;#8212;at least insofar as it
leaves out some important details.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;The basic design goal behind Word&amp;rsquo;s file format was to be able to read in
only that amount of information that was necessary to fill the document window
with text.  You can see the fruit of this today by conducting a little
experiment:&lt;/p&gt;

&lt;ul&gt;
&lt;li style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Boot Word.&lt;/li&gt;

&lt;li style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;In a new document, type &amp;lsquo;=rand()&amp;rsquo;&lt;/li&gt;

&lt;li style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Save this document as &amp;ldquo;SmallDoc&amp;rdquo;, and close it&lt;/li&gt;

&lt;li style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Open a new untitled document&lt;/li&gt;

&lt;li style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Type &amp;lsquo;=rand(100)&amp;rsquo;&lt;/li&gt;

&lt;li style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Type &amp;lt;Cmd&amp;gt;-y about twenty times (until you have more than 100 pages of text).&lt;/li&gt;

&lt;li style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Save this document as &amp;ldquo;BigDoc&amp;rdquo;, and close it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;You could, if you wanted to, grab a stopwatch and time the next few steps,
which are:&lt;/p&gt;

&lt;ul&gt;
&lt;li style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Select &amp;ldquo;SmallDoc&amp;rdquo; from the &amp;ldquo;File&amp;rdquo; menu&lt;/li&gt;

&lt;li style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Select &amp;ldquo;BigDoc&amp;rdquo; from the &amp;ldquo;File&amp;rdquo; menu&lt;/li&gt;
&lt;/ul&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;If you&amp;rsquo;re timing this, start the stopwatch when you mouse-up in each file
name on the menu, and stop the stopwatch when you first see the insertion
cursor blink.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;The first thing you&amp;rsquo;ll note is that there is no appreciable difference
between the amount of time it takes Word to open BigDoc and the amount of time
it takes Word to open SmallDoc&amp;#8212;this despite the huge difference in sizes.
 In my experiment, BigDoc is over 1 MB in size while SmallDoc is barely more
than 24K.  BigDoc is 40 times larger than SmallDoc, but I can&amp;rsquo;t tell the
difference when I open the files.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Now, there are a few data structures that are stored in the file and are
proportional to the amount of text in the file, but the actual data in them is
so small that reading them in approaches constant time relative to the amount
of time it takes to read in the actual text and formatting.  The result is,
even today, a file open time that is proportional to the size of your document
window, not proportional to the size of your document.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;The post on the Cult of Mac Blog quotes Bruce Damer&amp;rsquo;s claim that, &amp;ldquo;Bravo and
BravoX stored out files by essentially just dumping the memory heap,&amp;rdquo; which is
really a gross oversimplification.  If the file format consisted of a straight
dump of the memory heap, then opening a document would still take time
proportional to the size of your document.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;The formatting in a Word file, however, is allocated in blocks of 512 bytes.
 Formatting information is added to each of these blocks until they fill up, in
which case new blocks are allocated.  These blocks are written to the file as
full 512-byte blocks whether they&amp;rsquo;re full or not, which is the only sense in
which a Word file consists of a dump of the memory heap.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Damer attributes his claim to something Charles Simonyi said, but it&amp;rsquo;s
almost certain that either Damer didn&amp;rsquo;t fully understand what Simonyi was
saying or that Simonyi wasn&amp;rsquo;t entirely clear that this &amp;ldquo;memory dump&amp;rdquo; aspect of
Word&amp;rsquo;s file format is limited to the disk pages that hold formatting
information.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&amp;nbsp;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Rick&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=160368" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/History/default.aspx">History</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Microsoft+Word/default.aspx">Microsoft Word</category></item><item><title>Anatomy of a Software Bug</title><link>http://blogs.msdn.com/rick_schaut/archive/2004/05/19/135315.aspx</link><pubDate>Wed, 19 May 2004 20:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:135315</guid><dc:creator>Rick Schaut</dc:creator><slash:comments>90</slash:comments><comments>http://blogs.msdn.com/rick_schaut/comments/135315.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rick_schaut/commentrss.aspx?PostID=135315</wfw:commentRss><description>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Anatomy of a Software Bug&lt;/title&gt;
&lt;/head&gt;

&lt;body bgcolor=white lang=EN-US style='tab-interval:.5in'&gt;

&lt;div class=Section1&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Chris Mason is the person who hired me to work at Microsoft. By the time he
hired me, he&amp;rsquo;d already spent a great deal of time looking into the issue of
general software quality, and had written a memo (known as the &amp;ldquo;Zero Defects&amp;rdquo;
memo) that underlies much of our software practices today. The ideas have been
refined since then, but they haven&amp;rsquo;t changed much in terms of the basic
concepts.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;One of my favorite Chris Mason quotes comes from that memo, &amp;ldquo;Since human
beings themselves are not fully debugged yet, there will be bugs in your code
no matter what you do.&amp;rdquo; We work to minimize the bugs in the software we ship,
but they&amp;rsquo;ll always be there.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;The problem stems from the overall complexity of the software. In this
context, &amp;ldquo;complexity&amp;rdquo; doesn&amp;rsquo;t refer to the code itself. Rather, we&amp;rsquo;re talking
about the shear volume of things the user can do. In Word, for example, we
have:&lt;/p&gt;

&lt;ul&gt;

&lt;li style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;More than 850 command functions (e.g. Bold and Italic are the
same command function)&lt;/li&gt;

&lt;li style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;More than 1600 distinct commands (e.g. Bold and Italic are
distinct commands)&lt;/li&gt;

&lt;li style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;At any given time roughly 50% of these commands are enabled
(conservative estimate)&lt;/li&gt;

&lt;li style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;With just 3 steps, the possible combinations of code execution
paths exceeds 500 million&lt;/li&gt;

&lt;/ul&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Now, there&amp;rsquo;s a philosophical issue about the desirability of increasingly
complex software, but I&amp;rsquo;m not going to discuss it here. For all practical
purposes, I don&amp;rsquo;t think there&amp;rsquo;s much benefit to getting into a discussion about
it. It may be an interesting question on some level, but it&amp;rsquo;s one we&amp;rsquo;ll never
fully resolve. And I&amp;rsquo;m just not all that interested in getting bogged down in
an endless debate without the possibility of resolution.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;I mention the issue of complexity because it leads to subtle interactions
that can be difficult to track down. To illustrate the point even further, I
thought I&amp;rsquo;d discuss the anatomy of one of the more famous bugs we&amp;rsquo;ve had in
Word: the &amp;ldquo;Disk is full&amp;rdquo; on save error. Before I do, however, I should point
out that Pierre Igot, after some prodding on my part, did provide us with a
sample document that helped us to track down one of the more subtle
interactions involved in this particular problem. For that, Pierre, I thank you
and so do Word users everywhere.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;The story of this problem begins with a basic design decision made when
Richard Brodie was Word&amp;rsquo;s primary software architect. Brodie came to Microsoft
along with Charles Simonyi after working at the Xerox PARC where he&amp;rsquo;d worked on
Bravo&amp;#8212;their version of the GUI word processor. A number of the ideas used
in Word came from that early effort. Brodie joined Microsoft in 1981, began
work on Word in the summer of 1982, and finished version 1.0 in October of 1983.
You can read about much of the story in &lt;i&gt;Microsoft First Generation&lt;/i&gt;&lt;span
style='font-style:normal'&gt; by Cheryl Tsang.&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Brodie figured out that a document is really just a collection of pieces of
text, and that it didn&amp;rsquo;t really matter where each piece of text is physically
located within the document&amp;rsquo;s file. For that matter, you could have one piece
of text that came from one file and another piece of text that came from
another file. We refer to this collection of pieces of text as the &amp;ldquo;piece
table.&amp;rdquo;  This design has a number of benefits. For example, if you copy text
from one document to another, you don&amp;rsquo;t have to actually copy the text from one
file to another&amp;#8212;at least not right away. All you really need to do is
copy the appropriate entries in the piece table in the source document to the
piece table in the destination document. Of course, you do need to copy the
physical text and formatting from one file to the other when you save the
destination document, but delaying that physical copy until save time meant
that the actual copy/paste could be done very quickly.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;This design also made implementing undo rather simple. In fact, according to
Brodie, implementing undo was the primary reason to use this design. With this
design, all you have to do is create an internal undo document. When the user
deletes some text from the current document, for example, you copy the deleted
entries from the piece table to the undo document and save some information
about where those piece-table entries had been located in the original document.
To undo the delete, you just copy the piece-table entries from the undo
document back to the original document.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;This design does have one problem: where do you put the text that the user
types into the document if it doesn&amp;rsquo;t go into the file that&amp;rsquo;s behind the
document?  To solve that, Brodie added something called a &amp;ldquo;scratch&amp;rdquo; file, and
the scratch file remains a core part of Word&amp;rsquo;s design to this day. On the Mac,
Word creates this file in your TemporaryItems folder. On Mac OS X, this folder
is located at /private/tmp/&amp;lt;UID&amp;gt;/TemporaryItems, where &amp;ldquo;UID&amp;rdquo; is your user
ID number (for most people, that&amp;rsquo;s 501, but it can be a different number
altogether depending on how your user account was created). If start up Word,
open the terminal window and get a listing of your TemporaryItems folder, you&amp;rsquo;ll
see a file named something like &amp;ldquo;Word Work File S_.&amp;rdquo; There may be a number
after the &amp;ldquo;_&amp;rdquo; character. That&amp;rsquo;s Word&amp;rsquo;s scratch file (the &amp;ldquo;S&amp;rdquo; standing for
scratch). You might also see one or more files named &amp;ldquo;Word Work File D_&amp;rdquo; with
some number after the &amp;ldquo;_&amp;rdquo; character. This is a back-up copy of a document file
(the &amp;ldquo;D&amp;rdquo; standing for &amp;ldquo;Document&amp;rdquo;).&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;At this point, we need to fast-forward the story by a decade to the next major
feature that brought this problem to the fore: multiple undo. For ten years,
Word had undo, but it was just a single-level undo. For Word 6, we added the
ability to go back and undo every change you&amp;rsquo;d made to the document since you
first started editing it. And, with Word&amp;rsquo;s document/file architecture, this
wasn&amp;rsquo;t all that difficult to do: just make the undo document contain multiple
records with one record for each change to the main document. It&amp;rsquo;s a very cool
feature, and most of us couldn&amp;rsquo;t think of how we&amp;rsquo;d survive without it. But it
leads to a problem.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;It&amp;rsquo;s not uncommon for users to make a few edits to a document, save the
document, make a few more edits, save the document again, make a few more
changes, and continue this process of edit/save for hours on end. Each time you
delete text, however, the actual text itself exists in the last-saved file for
the document you&amp;rsquo;re editing, and, with multiple levels of undo, the undo
records for text deletions still point back to the last-saved version of the
document&amp;rsquo;s file before you deleted the text. The next time you save, Word can&amp;rsquo;t
close the last-saved version of the file, because the undo document still
contains a reference to it. So, if you keep editing and saving, you&amp;rsquo;ll
eventually hit an open file limit.  At least this was true of Word 6.  It&amp;rsquo;s
changed quite a bit since then.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Arguably, this is something we should have figured out before we shipped Word
6, but, as Chris Mason pointed out, we humans haven&amp;rsquo;t been fully debugged yet. 
Moreover, it&amp;rsquo;s easy to say that one should have thought of a particular
interaction in a complex piece of software, but that&amp;rsquo;s way easier said than
done.  When you&amp;rsquo;re implementing any given feature, you&amp;rsquo;re totally focused on
the basic problems involved in the feature itself.  To put this into
perspective, the person who implemented multiple undo in Word is one of the
best developers who has ever worked on Word, and has, since, been recognized as
a Microsoft Distinguished Engineer.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;The reality is, that we hadn&amp;rsquo;t realized we&amp;rsquo;d created this situation when we
added multiple levels of undo. Moreover, this problem has several different
variations on the basic theme. At this point, the story involves our efforts to
understand the nature and scope of the problem, and to come up with the &amp;ldquo;best&amp;rdquo;
way to fix it. Because of the variations, however, the problem has been like an
onion. We&amp;rsquo;d peel away one layer of the onion, only to find some other variation
that we hadn&amp;rsquo;t, for various reasons, figured out before.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;As we weave our way through the rest of the story, there are some important
points to keep in mind. The first is that I can&amp;rsquo;t fix what I can&amp;rsquo;t see, and, where
software bugs are concerned, &amp;ldquo;seeing&amp;rdquo; means being able to watch the program
execute, via some debugging tool, at the key point in the execution of the code
where the problem occurs. In order to do this, I have to have a precise set of
steps that consistently reproduces the problem. This not all that different from
the problem a mechanic faces when trying to figure out the cause of that
mysterious engine noise that only occurs after you&amp;rsquo;ve been driving the car
around town for a few hours.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;The second is that this particular problem is a developer&amp;rsquo;s worst nightmare.
The fundamental cause is a basic design decision that you made more than a
decade ago, and the only way to really fix it for certain is to rewrite the
entire application from the ground up. Since that&amp;rsquo;s simply not an option for a
product that you&amp;rsquo;ve shipped several times, you&amp;rsquo;re left with trying to make the
problem difficult for most users to run into while trying to also minimize the
negative effects if the user should ever run into the problem. This approach
can, unfortunately, lead you to believe that you&amp;rsquo;ve come up with an &amp;ldquo;optimal&amp;rdquo;
fix only to discover later that there&amp;rsquo;s another facet you haven&amp;rsquo;t taken into
consideration (because you didn&amp;rsquo;t even know it existed until you peeled away
the previous layer of the onion).&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;The third point to keep in mind is that we in Mac BU have relatively limited
resources. When there&amp;rsquo;s a problem that&amp;rsquo;s fundamental to Word itself, we tend to
let our Win Word siblings focus on that problem. Our efforts tend to have little
chance of adding to their efforts, and this frees us up to focus on problems
specific to Mac users. In general, this is the most efficient way to handle
problems that our users are having, but there can be instances where there&amp;rsquo;s a
Mac-specific dimension to a problem. As we&amp;rsquo;ll see soon enough, this particular
problem had a Mac-specific dimension that complicated our efforts to fix it,
and it took us a while to find that Mac-specific dimension.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Lastly, the fact that Mac Word&amp;rsquo;s code base has been forked from Win Word&amp;rsquo;s
means that the Win Word people can make a change in the code for one reason,
and that change can have other side-effects that we won&amp;rsquo;t see in the Mac
version until we run into some very specific circumstances that show us the
different behaviors caused by this change. In this particular case, Win Word
added two lines of code in a routine that would seemingly be completely
unrelated to this problem, but also made this problem much more difficult for
users to run into in Win Word than it was in Mac Word. This one is the last
piece (maybe I should say &lt;i&gt;latest&lt;/i&gt;&lt;span style='font-style:normal'&gt; piece)
in the puzzle that we discovered only a few months ago.&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Whew!  That&amp;rsquo;s a lot to keep in the back of our heads, but, nonetheless, let&amp;rsquo;s
rewind back about ten years. Word 6.0 has just shipped on Windows, and we&amp;rsquo;re
pretty happy with people&amp;rsquo;s reactions to the product. It doesn&amp;rsquo;t take long,
though, for us to figure out that there&amp;rsquo;s a fly in the ointment. Reports start
trickling in about people editing their documents &amp;ldquo;for a while&amp;rdquo; at which point
they try to save their document and they get a &amp;ldquo;Disk is full&amp;rdquo; error. We&amp;rsquo;d ask
people what they were doing, and the response was always some form of vague
notion that they&amp;rsquo;d just been editing their document &amp;ldquo;for a while.&amp;rdquo;  The precise
measurement of &amp;ldquo;for a while&amp;rdquo; varied from user to user. For some folks, it was a
little over an hour. For others, it was several hours. Reproducing the problem
appeared to be highly dependant upon the user&amp;rsquo;s work habits.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;After several months of trying to figure out the problem, someone in testing
wrote a macro that inserted a large amount of text into the document and then,
in a loop, replace successive words within the document saving it after each
replace. Run this macro for a while, and you get a &amp;ldquo;Disk is full&amp;rdquo; error on one
of the saves, at which point you can no longer save your document. Cool!  We
now have steps that reproduce the problem.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;So, this document got handed off to a developer, who then fired up Word
under the debugger, opened the document and ran the macro. The problem &amp;ldquo;reproduced,&amp;rdquo;
but, for reasons that weren&amp;rsquo;t apparent at the time, the error that the
developer ran into was subtly different from the error that the tester ran into.
The developer thought about the problem he was seeing, and came up with one of
those &amp;ldquo;optimal&amp;rdquo; fixes I mentioned above. It was the &amp;ldquo;right&amp;rdquo; fix in terms of the
problem the developer saw, but it wasn&amp;rsquo;t the &amp;ldquo;right&amp;rdquo; fix for the problem that
the tester saw.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;What was this subtle difference between what the developer saw and what the
tester saw?  As I mentioned above, the basic theme of the problem is to hit &lt;i&gt;an&lt;/i&gt;&lt;span
style='font-style:normal'&gt; open file limit. In this case, there are two limits:
Word&amp;rsquo;s internal open file limit and the OS&amp;rsquo; open file limit. It turns out that
the debugger bumps the OS&amp;rsquo; open file limit from what it would normally be when
you run Word outside the debugger. When the tester ran the macro, Word hit the
OS&amp;rsquo; open file limit. When the developer ran the macro, with Word running under
the debugger, Word ran into its own, internal, file limit.&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;After a few iterations of the tester saying, &amp;ldquo;Sorry, but the bug&amp;rsquo;s not fixed
yet,&amp;rdquo; and the developer saying, &amp;ldquo;What are you talking about? I don&amp;rsquo;t see the
problem!&amp;rdquo; they both figured out that they were seeing different errors. Crap! 
The problem only reproduces when you&amp;rsquo;re &lt;i&gt;not&lt;/i&gt;&lt;span style='font-style:normal'&gt;
running under the debugger, which removes the one case where the developer can
actually see what&amp;rsquo;s going on. At this point, we have yet to figure out that the
problem involves hitting the OS&amp;rsquo; open file limit. At this point, though, the
developer isn&amp;rsquo;t completely in the dark, and comes up with a fix for the tester&amp;rsquo;s
problem.&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;As I pointed out, the problem involves the undo document having a reference
to the previously saved-version of the document&amp;rsquo;s file. The developer&amp;rsquo;s
original fix was to add some code, in the case where Word hit its internal open
file limit, that would basically remove everything from the undo document (what
we refer to as &amp;ldquo;nuking the undo stack&amp;rdquo;). Nuking the undo stack allows the save
to proceed, because Word can now close the open files that were referenced by
the undo document. However, since the tester was seeing a different error, the
developer&amp;rsquo;s fix didn&amp;rsquo;t handle that case.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Nonetheless, the developer took a different approach. Knowing that the undo
document was very likely to be involved, one could walk through the undo
document, and copy the text for any pieces that pointed to the previously-saved
version of the document&amp;rsquo;s file to the scratch file. He coded up the solution,
and handed a buddy-build off to the tester. The tester ran the macro, and the
problem was fixed. The first layer of the onion had been peeled away, but the
fix still wasn&amp;rsquo;t an &amp;ldquo;optimal&amp;rdquo; fix. As it stood, the chances that a user would
run into the problem had been greatly reduced, but we still hadn&amp;rsquo;t dealt with
the &amp;ldquo;minimize the damage if they do hit it&amp;rdquo; side of the issue. That&amp;rsquo;s because,
at this point, we had yet to understand that the problem outside the debugger
had to do with the OS&amp;rsquo; open file limit. Because this problem wouldn&amp;rsquo;t reproduce
under the debugger, the developer had no way of knowing exactly where the
failure was occurring. Without knowing that, the developer didn&amp;rsquo;t know where to
add the code that would &amp;ldquo;nuke the undo stack.&amp;rdquo;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;To give you a sense of the time frame, this fix was ported from Win Word to
Mac Word during the Office 2001 development cycle, and was back-ported into
Word 98 for a service release that was done not too long after that. It&amp;rsquo;s also
at this point where the Win Word and Mac Word stories diverge. There are two
reasons for this. The first is that this was the point in time where Win Word
got that two-line code change that I mentioned above. The second is that the
open file limit under Mac OS is different than it is under Windows. I might be
mistaken on this point, but I think the open file limit under Mac OS X is
different from the limit under Mac OS 9 as well.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;At this point, we still didn&amp;rsquo;t know that the basic problem involved hitting
the OS&amp;rsquo; open file limit. After a while, though, we did know that Mac Word users
were seeing this problem way more often than Win Word users. In fact, the
difference was enough for Mac Word testers to start investigating the problem
directly. One of the things we did know is that the problem involved file
references in the undo document. So, we came up with a variation of the
original fix.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;In order to understand this, we have to understand a basic principle of
fixes. You make the simplest code change required to fix the problem. This
reduces the chances that the fix will cause some other problem that is,
potentially, worse than the one you&amp;rsquo;re trying to fix. When you&amp;rsquo;re mucking about
with the locations where data is stored in files, the potential for
catastrophic problems resulting from your fix is high. In that sense, the
original fix for this problem was limited to copying what might be known as &amp;ldquo;simple&amp;rdquo;
pieces. A &amp;ldquo;simple&amp;rdquo; piece has only text. A &amp;ldquo;complex&amp;rdquo; piece might have a graphic,
or it might involve a field in the document, both of which are likely to have
data in the file in addition to the text itself.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;With this in mind, for Mac Word X, we modified the notion of what would be a
&amp;ldquo;simple&amp;rdquo; piece of text for the sake of deciding whether or not to copy a piece
from the previously-saved document&amp;rsquo;s file over to the scratch file. To view
this in a slightly different way, we made the code that copies undo document
referents more aggressive. This resolved another test case that the Mac Word
testers had developed, again using a slightly different macro that would
eventually cause the &amp;ldquo;Disk is full&amp;rdquo; error to occur. This fix didn&amp;rsquo;t actually
make it into the shipping release of Mac Office X, but it was included in a
subsequent SR (I don&amp;rsquo;t recall specifically which one).&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;At this point, we &lt;i&gt;still&lt;/i&gt;&lt;span style='font-style:normal'&gt; don&amp;rsquo;t know that
the problem involves the OS&amp;rsquo; open file limit. That discovery didn&amp;rsquo;t happen
until this past summer when, through the very persistent efforts of Mac Word&amp;rsquo;s
current lead tester, we were able to use some tools on Mac OS X to figure out
exactly what was happening. While we were able to verify this, we still didn&amp;rsquo;t
know the exact location where Word was failing to open a file due to having hit
the OS&amp;rsquo; open file limit. Again, we still can&amp;rsquo;t get this to reproduce under the
debugger, and there are a couple of places in the save process where it can
fail because the OS won&amp;rsquo;t let Word open the file. So, rather than scatter fixes
all over the place, we went with the sure fix: lower Word&amp;rsquo;s internal open file
limit so we hit it before we hit the OS&amp;rsquo; open file limit. This allows the code
that nukes the undo stack to kick in, and then save the succeeds.&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;This brings us to late February/early March of this year, and the discussion
I&amp;rsquo;d had with Pierre. While we still can&amp;rsquo;t reproduce the actual file open
failure under the debugger, we now have enough information about what causes
the problem to be able to predict when the failure will eventually occur. From
that, we knew enough about the bug for me to believe that Pierre shouldn&amp;rsquo;t
still be hitting that &amp;ldquo;Disk is full&amp;rdquo; save error in the version of Word he was
using. Yet, he was still running into the problem.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;That was the bad news: there was something about this problem that we still
didn&amp;rsquo;t fully understand. However, armed with a sample document and the ability
to predict when the error will occur, I could do something we&amp;rsquo;d never been able
to do before: set up Word under the debugger, perform some steps in Word to see
if those steps caused the predictive condition to occur, and set breakpoints
that would tell me exactly why we weren&amp;rsquo;t able to copy pieces from the undo
document over to the scratch file.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;This is where I discovered those two lines of code that had been added to
Win Word so long ago, yet hadn&amp;rsquo;t been added to Mac Word. When Word lays out a
page in page layout view and a header or footer is visible, it updates any
fields in the header or footer. If you have, say, a page field in the visible
header/footer, Word will update that field. This is particularly necessary when
you have the footer of one page and the header of the following page both
visible in the document window. Word has to layout two pages in the same
update, so it updates fields for the first page footer, lays out that page,
then updates the fields for the next page header and lays out that page.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Now, why would this result in a field being copied over to the undo
document?  Well, Word has something called &amp;ldquo;auto undo tracking.&amp;rdquo;  Basically,
when you&amp;rsquo;re typing, Word automatically tracks the changes you&amp;rsquo;re making until
you do something that causes Word to close out the &amp;ldquo;typing&amp;rdquo; undo record. You
can see this when you click on the &amp;ldquo;Undo&amp;rdquo; dropdown on the standard toolbar. You&amp;rsquo;ll
see &amp;ldquo;Typing &amp;lt;text you typed&amp;gt;&amp;rdquo; at various locations in the dropdown
interspersed with other actions you&amp;rsquo;ve taken.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;The two lines of code that were added to Win Word paused automatic undo
tracking while updating these fields in the header or footer during page
layout, then un-paused automatic undo tracking once the field update was
finished. Ugh!  How, on earth, were we to ever figure out that these two lines
of code were the primary reason Win Word users weren&amp;rsquo;t seeing this problem
nearly as often as Mac Word users?  In any event, if you&amp;rsquo;ve stayed with me long
enough, here&amp;rsquo;s a tip you can use until we release an SR of Word X (or earlier)
with this fix. If you have a document that has headers and footers with page
fields in them, do your editing in Normal view, and you&amp;rsquo;ll likely never hit the
&amp;ldquo;Disk is full&amp;rdquo; save error.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Right about now, you&amp;rsquo;re probably asking, &amp;ldquo;Why did it take so long to figure
out what was up with this?&amp;rdquo;  Well, you might as well ask why police departments
continue to have a large number of unsolved crimes on the books. The issue is the
same: the investigation stalls for the lack of any further leads to follow. For
the same reason that the police can&amp;rsquo;t just go out and start arresting anyone
who might be a suspect, we can&amp;rsquo;t go scattering potential fixes throughout the
code. Until we figure out what the precise nature of the problem is, we need
leads that we can follow. The mere fact that you&amp;rsquo;re running into a particular
problem isn&amp;rsquo;t a lead that I can follow. Specific details about potential
suspects, however, are leads I can follow. When it comes to software problems, leads
I can follow consist of information that helps me to reproduce the problems
consistently.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;And, always remember that I can&amp;rsquo;t fix what I can&amp;rsquo;t see. I have to be able to
reproduce the problem while being able to run some kind of diagnostic tool. The
key to fixing a bug is predictability. Without predictability, I can&amp;rsquo;t fix it,
because without predictability I have no way to understand how the complex
interactions in modern software cause the specific problem to occur.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&amp;nbsp;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Rick&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=135315" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/History/default.aspx">History</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Programming/default.aspx">Programming</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Microsoft+Word/default.aspx">Microsoft Word</category></item><item><title>Do You Remember?</title><link>http://blogs.msdn.com/rick_schaut/archive/2004/05/14/132087.aspx</link><pubDate>Fri, 14 May 2004 17:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:132087</guid><dc:creator>Rick Schaut</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/rick_schaut/comments/132087.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rick_schaut/commentrss.aspx?PostID=132087</wfw:commentRss><description>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Do You Remember&lt;/title&gt;
&lt;/head&gt;

&lt;body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'&gt;

&lt;div class=Section1&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;So, I blogged about life in Mac BU, and &lt;a
href="http://radio.weblogs.com/0001011/2004/05/14.html#a7472"&gt;Scoble&lt;/a&gt; picked
up on it.  It&amp;rsquo;s always interesting when this happens, because some of the
comments from Scoble&amp;rsquo;s readers can be a bit amusing.  For example, Robert noted
Microsoft&amp;rsquo;s early investment in the Macintosh platform, and one of his readers
questioned when that investment ever happened.  I don&amp;rsquo;t know.  Maybe he thinks
that creating software doesn&amp;rsquo;t cost anything.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Anyway, it got me thinking about that original software investment and how
it all started, and I thought, &amp;ldquo;Hm&amp;#8230;  I wonder if anyone remembers the Software
Dating Game.&amp;rdquo;  For those who don&amp;rsquo;t know or don&amp;rsquo;t remember, the first Apple
sales meeting for the Macintosh featured a spoof on the old Dating Game with
Steve Jobs asking questions on behalf of the new lady, Macintosh, of three
potential suitors in the form of executives of different software companies. 
The problem is, I could only remember Bill Gates and Mitch Kapor as two of the
suitors, but I couldn&amp;rsquo;t remember the third (or even the company he
represented).  So, I did a little googling, and ran into &lt;a
href="http://toastdesign.com/apple1984ad/d10gatesEtc.html"&gt;this&lt;/a&gt;&amp;#8212;gads,
do they look young!  Ah, yes.  Fred Gibbons.  Software Publishing Corp. 
Harvard Graphics.  How &lt;i&gt;could&lt;/i&gt;&lt;span style='font-style:normal'&gt; I forget?&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;By the way, the ToastDesign site has quite a few items to facilitate a nice
little trip down memory lane.  I like &lt;a
href="http://toastdesign.com/apple1984ad/p05.html"&gt;this&lt;/a&gt; one.  Check out the
two pictures on the top of the right-most column.  Remember the &amp;ldquo;Portable&amp;rdquo; Mac?
 I think about that, and then think about the 15&amp;rdquo; PowerBook G4 that&amp;rsquo;s sitting
on my lap as I type this, and I can&amp;rsquo;t help but marvel at the operation of
Moore&amp;rsquo;s Law.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Of course, some of the memories are not so pleasant: remote debugging using
a PC connected to the Mac via SCSI interface (shudder).  But, it&amp;rsquo;s still good
to remember how far you&amp;rsquo;ve come even if there were a few folks who didn&amp;rsquo;t quite
figure out how to come along for the ride.&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&amp;nbsp;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;Rick&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=132087" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/History/default.aspx">History</category></item><item><title>Where's Rick?</title><link>http://blogs.msdn.com/rick_schaut/archive/2004/04/30/124320.aspx</link><pubDate>Sat, 01 May 2004 01:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:124320</guid><dc:creator>Rick Schaut</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/rick_schaut/comments/124320.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rick_schaut/commentrss.aspx?PostID=124320</wfw:commentRss><description>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Where's Rick?&lt;/title&gt;
&lt;/head&gt;

&lt;body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'&gt;

&lt;div class=Section1&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&lt;span style='font-size:12.0pt'&gt;Wow, leave blogging aside for a while, and the world just passes you by.  The past few weeks have been so
busy, that I haven&amp;rsquo;t even been able to read the blogs I follow.  I fired up
NetNewsWire this evening, and there were over 700 posts awating my perusal. 
Clearly, I&amp;rsquo;m not going to get through them all.&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&lt;span style='font-size:12.0pt'&gt;So, why have I not been blogging lately?  Well, we sent Mac Office 2004 off to manufacturing, at which
point we all took a few days to just decompress.  At the end of a product
cycle, you tend to not even want to look at a computer, let alone sit down in
front of one in order to type out a few random thoughts.  Unfortunately, my
boat was out of the water getting a new coat of paint on the bottom, so I
didn&amp;rsquo;t get to do much sailing either.  Yes, my timing was impeccable.&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&lt;span style='font-size:12.0pt'&gt;Also, the end of April is a very busy time for members of the Bah&amp;aacute;'&amp;iacute; Faith.  We have three holy days, an
annual meeting, our regular monthly meeting (monthly in terms of the Bah&amp;aacute;'&amp;iacute;
calendar, not the Gregorian calendar&amp;#8212;don&amp;rsquo;t ask), and a national
convention all packed into the span just short of two weeks.  In any event, my
evenings have been pretty clogged, and, in fact, I have another meeting to go
to tonight.&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&lt;span style='font-size:12.0pt'&gt;After the decompression time was over, it was back to work where I&amp;rsquo;ve had three major items on my plate. 
The first is engineering excellence planning which is where we take a look at
some of our development methodologies and think about ways we can improve the
process.  As part of this, I&amp;rsquo;ve been working on writing some new unit testing
code for Word which my Win Word counterparts are interested in stealing when
I&amp;rsquo;m done (and I&amp;rsquo;m almost there).&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&lt;span style='font-size:12.0pt'&gt;The second is some product planning for Office 12.  I&amp;rsquo;ve blogged about this in broad strokes &lt;a
href="http://blogs.msdn.com/rick_schaut/archive/2004/02/28/81532.aspx"&gt;before&lt;/a&gt;.
 Basically, we take some prototypical users, and we design some product use
scenarios around those users&amp;rsquo; needs.  I&amp;rsquo;m a member of a cross-discipline team
that&amp;rsquo;s drilling down into one of those scenarios.  There is a different team
drilling down into each scenario, understandiing what users are doing, looking
into how our products presently help them solve the problems they&amp;rsquo;re facing and
identifying what might be referred to as users&amp;rsquo; &amp;ldquo;pain points&amp;rdquo; as they try to
solve these higher-level problems.  From this work, we&amp;rsquo;ll design the features
that will go into the next version of Mac Office.&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&lt;span style='font-size:12.0pt'&gt;The third big item on my plate was the Customer Council meeting.  The Customer Council consists of a
number of customers who have purchased premium support.  One of the things you
can have with premium support is the ability to sit down with the product teams
and discuss what your issues are.  We had representatives from firms like the
Rand Corporation, Turner Broadcasting, Gannett News, and several others.  I
think there were about 25-30 representatives present.&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&lt;span style='font-size:12.0pt'&gt;Normally, presentations at the Customer Council meetings are handled by program managers, but, following
the release of Office 2004 to manufacturing, we had some personnel changes in
the program management group affecting Word.  So, I got to be the one making
the presentation for Word, which is something I really enjoy doing and don&amp;rsquo;t
often get to do because I&amp;rsquo;m a developer.  The other cool thing about it was,
after I&amp;rsquo;d finished my presentation and discussed some of the future directions
we plan on taking with the next version of Office, none of the members of the
Customer Council had any further questions.  Members of the Customer Council
don&amp;rsquo;t pull their punches, so when they don&amp;rsquo;t have any further questions or
comments after you&amp;rsquo;ve finished the presentation, you&amp;rsquo;ve pretty much nailed it.&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&lt;span style='font-size:12.0pt'&gt;The other very cool thing about this year&amp;rsquo;s Customer Council is that we spent a good chunk of time
sitting down with representatives from Apple, and the level of communication in
the room was appreciably better than anything I&amp;rsquo;ve seen in the past almost 14
years.  The results were so positive, that we think we want to do this kind of
thing, sit down with customers, representatives from Apple and representatives
Microsoft all at the same time to hammer out some issues.  I don&amp;rsquo;t think it
will be all that long before users reap some benefits from this kind of
cross-communication.  It&amp;rsquo;s very much a sea-change, and, I think, a very welcome
development for the industry.&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&lt;span style='font-size:12.0pt'&gt;Anyway, so while I&amp;rsquo;ve been doing all this, &lt;a href="http://blogs.msdn.com/chris_pratley/"&gt;Chris Pratley&lt;/a&gt;
has been on paternity leave (congratulations on the baby, Chris).  He&amp;rsquo;s been &lt;a
href="http://blogs.msdn.com/chris_pratley/archive/2004/04/27/120944.aspx"&gt;blogging&lt;/a&gt;,
and &lt;a href="http://blogs.msdn.com/chris_pratley/archive/2004/04/28/122004.aspx"&gt;blogging&lt;/a&gt;,
and &lt;a href="http://blogs.msdn.com/chris_pratley/archive/2004/04/28/122374.aspx"&gt;blogging&lt;/a&gt;
and &lt;a href="http://blogs.msdn.com/chris_pratley/archive/2004/04/29/123619.aspx"&gt;blogging&lt;/a&gt;
about some of the history of Word.  The posts provide a nice compliment to my
post on &lt;a
href="http://blogs.msdn.com/rick_schaut/archive/2004/02/26/80193.aspx"&gt;Mac Word
6.0&lt;/a&gt;.  Unfortunately, in the process, Chris discussed some of the things I
had in mind.&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&lt;span style='font-size:12.0pt'&gt;One of the issues I wanted to talk about is why there is no &amp;ldquo;&lt;a
href="http://blogs.msdn.com/chris_pratley/archive/2004/04/28/122374.aspx"&gt;reveal
codes&lt;/a&gt;&amp;rdquo; feature in Word.  People ask me about this relatively often, and,
when they do, I know I&amp;rsquo;m talking to former Word Perfect users.  As Chris points
out, Word Perfect used markup codes to do things like turn on bold, then,
later, turn it off, similar to the way HTML works, while Word uses what might
be described as a parallel array of runs of text matched to buckets of
formatting properties (well, actually, they&amp;rsquo;re coded as differences from the
underlying style, but that&amp;rsquo;s a detail for another post).  One of the things
Chris doesn&amp;rsquo;t point out, however, is how Word&amp;rsquo;s design is better suited for
WYSIWYG word processors.&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&lt;span style='font-size:12.0pt'&gt;Suppose I give you an arbitrary location in the document (because, say, that happens to be the first
character of the first line being displayed in the current document window),
and ask you whether or not the character at that location is bold.  Under the
markup design, you have to start from the beginning of the document, and scan
forward to the arbitrary location I&amp;rsquo;ve given you.  Under Word&amp;rsquo;s design, you
merely search for the corresponding run of text that contains that document
location, and go look at the property bucket to see if bold is there.  In
Computer Science terminology, Word Perfect&amp;rsquo;s design requires an O(n) search,
while Word&amp;rsquo;s design requires an O(log(n)) search.&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&lt;span style='font-size:12.0pt'&gt;Now, this didn&amp;rsquo;t mean all that much back in the days when the word processor presented the document on a
character-based display.  In fact, it actually put Word at a bit of a handicap,
because Word was doing extra work to maintain the parallel buckets for all the
formatting informtion.  Word Perfect could just dump whatever characters you
typed into the file without having to worry about ensuring that any formatting
that&amp;rsquo;s applied to the newly-typed text gets stored as well as the new text. 
When people start using Windows, however, Word&amp;rsquo;s design had the advantage while
Word Perfect&amp;rsquo;s design was at a disadvantage.  This is yet another data point
showing why we need to design the UI first, and then implement the features. 
It&amp;rsquo;s also something to keep in mind when people think about the history of word
processors.&lt;/span&gt;&lt;/p&gt;

&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&lt;span style='font-size:12.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt; 
&lt;p style='font-size:11pt;font-family:Times New Roman, Times, serif'&gt;&lt;span style='font-size:12.0pt'&gt;Rick&lt;/span&gt;&lt;/p&gt; 
&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=124320" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/History/default.aspx">History</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Personal/default.aspx">Personal</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Microsoft+Word/default.aspx">Microsoft Word</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Mac+BU/default.aspx">Mac BU</category></item><item><title>BruceO's Prank</title><link>http://blogs.msdn.com/rick_schaut/archive/2004/03/07/85383.aspx</link><pubDate>Sun, 07 Mar 2004 08:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:85383</guid><dc:creator>Rick Schaut</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/rick_schaut/comments/85383.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rick_schaut/commentrss.aspx?PostID=85383</wfw:commentRss><description>&lt;html&gt;

&lt;head&gt;
&lt;title&gt;BruceO's Prank&lt;/title&gt;
&lt;style&gt;
&lt;!--
 /* Font Definitions */
@font-face
	{font-family:"Times New Roman";
	panose-1:0 2 2 6 3 5 4 5 2 3;}
@font-face
	{font-family:Arial;
	panose-1:0 2 11 6 4 2 2 2 2 2;}
@font-face
	{font-family:"\FF2D\FF33 \660E\671D";}
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
h1
	{margin-top:12.0pt;
	margin-right:0in;
	margin-bottom:3.0pt;
	margin-left:0in;
	font-size:14.0pt;
	font-family:Arial;}
h2
	{margin-top:12.0pt;
	margin-right:0in;
	margin-bottom:3.0pt;
	margin-left:0in;
	font-size:12.0pt;
	font-family:Arial;
	font-style:italic;}
h3
	{margin-top:12.0pt;
	margin-right:0in;
	margin-bottom:3.0pt;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;
	text-underline:single;}
table.MsoNormalTable
	{font-size:10.0pt;
	font-family:"Times New Roman";}
 /* Page Definitions */
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
--&gt;
&lt;/style&gt;
&lt;/head&gt;

&lt;body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=MsoNormal&gt;Microsoft is a great place to work, even if you are a Mad
Mac Maven.  There are a lot of reasons for that, but the best is that you get
to work with some pretty cool people.  I&amp;rsquo;ve already mentioned Ed Fries (which
is pronounced &amp;ldquo;Freeze,&amp;rdquo; by the way).  Another is Bruce Oberg.&lt;/p&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=MsoNormal&gt;Bruce is currently the head of &lt;a
href="http://www.suckerpunch.com"&gt;Sucker Punch Productions&lt;/a&gt;, a software
company that writes games for Nintendo and Sony PlayStation.  Before starting
up Sucker Punch, he was my boss on Mac Word 98.  Bruce&amp;rsquo;s&lt;a
href="http://www.miksovsky.com/Game/NIT2000/Meet%20the%20team.htm"&gt; Purple Team&lt;/a&gt;
is the only two-time winner of &lt;a href="http://www.gamecontrol.com"&gt;The Game&lt;/a&gt;.
 Bruce was the Special Guest Host at the infamous MacHack &amp;lsquo;94, where the Wednesday
night opening session with Andy Hertzfeld extended well into the wee hours of
Thursday morning aided by 75 pizzas delivered from Dominos.  Bruce&amp;rsquo;s vanity
license plate reads &amp;ldquo;OTTFFSS.&amp;rdquo;  I guess you could say that he makes it count.&lt;/p&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=MsoNormal&gt;Bruce also orchestrated one of the best pranks ever pulled
off at Microsoft.&lt;/p&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=MsoNormal&gt;A little background is necessary.  Every business unit at
Microsoft has at least one person who acts as the administrative glue that
holds the whole unit together.  At one time, they were called Group Assistants,
but they&amp;rsquo;re now known as Administrative Assistants or Admins.  They are
indispensable to Microsoft&amp;rsquo;s overall functioning.  If you really want to deal
Microsoft a blow, hire away all the admins.&lt;/p&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=MsoNormal&gt;Admins report to specific unit managers.  When managers move
around, the admins go with them.  So, when Ed Fries left the Word group, he
took Pam Wagner with him.  Pam was greatly loved in the Word group.  She was
friendly, efficient, and was good at doing things like finding snacks for 30
developers who work pulling a late-night Workaholic Wednesday.  I still
remember her spending months returning all the &amp;ldquo;Ship-it&amp;rdquo; awards to people in
buildings 16, 17 and 18 after a group of Word developers had collected them all
and stacked them in Ed&amp;rsquo;s office.  Not once did she complain about the task.&lt;/p&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=MsoNormal&gt;Ed&amp;rsquo;s replacement, Antoine Leblond, had the unenviable task
of hiring a replacement for Pam, and it was taking for ever.  Dev leads were
filing their own expense reports, we were bartering for the equipment we needed,
and the storeroom was packed to the gills with stuff that wasn&amp;rsquo;t being
offloaded to some other group that might need our surplus.  Things were getting
desperate.&lt;/p&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=MsoNormal&gt;On Friday, March 29&lt;sup&gt;th&lt;/sup&gt;, 1996, Antoine announced
that he&amp;rsquo;d found a new group assistant.  Her name was Meredyth, and she&amp;rsquo;d be
starting the following Monday.   At last, relief was in sight.&lt;/p&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=MsoNormal&gt;By mid-morning Monday, it was pretty clear that Meredyth was
no Pam.  Part of that had to do with the incense she burned in her office, the
affirmations she put up on the wall (&amp;ldquo;I deserve to succeed!  Yes, I do!&amp;rdquo;) and
the bright pink name-tag on the door along with the note she put beneath it
inviting everyone to, &amp;ldquo;Please stop in and say hi.&amp;rdquo;  Another had to do with the
heart-shaped stickers she put on everyone&amp;rsquo;s door&amp;#8212;well everyone except
Mark Walker who got one on his shirt.&lt;/p&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=MsoNormal&gt;By early afternoon, things were starting to really look
amiss.  Meredyth went to everyone&amp;rsquo;s office to schedule a fire drill. 
Notification of that sort of thing came from facilities, and you received it
via e-mail.  Later, Pam showed up to help Meredyth get acclimated, and that
resulted in a number of indignant outbursts from Meredyth directed at Pam.  The
latter was enough to have several Word developers ready to show Meredyth the
door regardless of what Antoine wanted.  Whatever way Pam did anything, large
or small, Meredyth did it in exactly the opposite way.&lt;/p&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=MsoNormal&gt;By the weekly 3:00 pm team meeting, mutiny was in the air. 
Antoine introduced Meredyth, at which point Meredyth delivered a teary tale
about people not being nice to her saying that while this was her first day at
Microsoft, it would also be her last.  The outburst ended when she stormed out
of the room.  A minute latter, she came back into the room still teary-eyed,
and said, &amp;lsquo;I forgot my purse.&amp;rdquo;  She picked up her purse, headed back to the
door, and, just before exiting, said, &amp;ldquo;And, by the way, April Fools!&amp;rdquo;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=MsoNormal&gt;A minute later, she came back into the room to thunderous
applause. &amp;ldquo;Meredyth&amp;rdquo; was a Seattle actress whom Bruce had hired for the day. 
At the time, she worked for Anything Entertainment, but I don&amp;rsquo;t know if she
still does.&lt;/p&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=MsoNormal&gt;On Tuesday, we got e-mail from facilities saying that we&amp;rsquo;d
be having a fire inspection and alarm test on Thursday.&lt;/p&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=MsoNormal&gt;You can read Bruce&amp;rsquo;s account &lt;a
href="http://www.oberg.org/wordsga.htm"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=MsoNormal&gt;Rick&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=85383" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/History/default.aspx">History</category></item><item><title>Mac Word 6.0</title><link>http://blogs.msdn.com/rick_schaut/archive/2004/02/26/80193.aspx</link><pubDate>Thu, 26 Feb 2004 10:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:80193</guid><dc:creator>Rick Schaut</dc:creator><slash:comments>89</slash:comments><comments>http://blogs.msdn.com/rick_schaut/comments/80193.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rick_schaut/commentrss.aspx?PostID=80193</wfw:commentRss><description>&lt;div class="Section1"&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;Mom always said, &amp;ldquo;The only good thing about beating your head against the wall is that it feels good when you stop.&amp;rdquo;&amp;nbsp; Well, sorry Mom, but that&amp;rsquo;s not fully true.&amp;nbsp; While you&amp;rsquo;re sitting on the couch buried beneath an ice pack, you tend to come up with a few ways to mind your head.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;Shipping a crappy product is a lot like beating your head against the wall.&amp;nbsp; It really does feel good when you ship a great product as a follow-up, and it really does motivate you to spend some time trying to figure out how not to ship a crappy product again.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;Mac Word 6.0 was a crappy product.&amp;nbsp; And, we spent some time trying to figure out how not to do that again.&amp;nbsp; In the process, we learned a few things, not the least of which was the meaning of the term &amp;ldquo;Mac-like.&amp;rdquo;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;In order to understand why Mac Word 6.0 was a crappy product, we need to understand both the historical background that led to some key decisions, and we need to understand some of the technical problems that resulted from those decisions.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;h3&gt;&lt;b&gt;&lt;font size="4" face="Garamond"&gt;&lt;span style='font-size:14.0pt'&gt;Mac Word 5 and Pyramid&lt;/span&gt;&lt;/font&gt;&lt;/b&gt;&lt;/h3&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;On October 5, 1991, we shipped Mac Word 5.0.&amp;nbsp; The reviews were glowing.&amp;nbsp; For the effort, we received the Mac software equivalent of a Tony award: the Mac World Eddy.&amp;nbsp; Even today, there are people who say that Mac Word 5.0/5.1 comprise the best version of Mac Word we&amp;rsquo;ve ever shipped.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;While Mac Word 5 was a great product, there was one problem with it: Win Word 2.&amp;nbsp; They both shipped at about the same time, but Win Word 2 had more features (most notably a macro language, but there were a few others).&amp;nbsp; This was a major sore point for Mac Word users.&amp;nbsp; They wanted feature parity, and they wanted it now!&amp;nbsp; The longer they had to wait for feature parity between Win Word and Mac Word, the more we got raked over the coals.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;But we had a problem.&amp;nbsp; Actually, we had a couple problems, the first being that Win Word and Mac Word were built from separate code bases.&amp;nbsp; The other problem was Word Perfect.&amp;nbsp; At that time, it still represented a major competitor on Windows, and we still had some catch-up work to do in order to get better than Word Perfect.&amp;nbsp; If we had continued to develop Mac Word and Win Word from separate code bases, Mac Word would never have caught up to Win Word in terms of feature parity.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;As of October of 1991, we already had a plan to address the first problem: the Pyramid project.&amp;nbsp; It was a complete rewrite of Word intended both to address some nagging issues with what had, by that time, become somewhat of a crusty code base and to address the separate code base problem.&amp;nbsp; Both Win Word and Mac Word would be built from that same code base.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;h3&gt;&lt;b&gt;&lt;font size="4" face="Garamond"&gt;&lt;span style='font-size:14.0pt'&gt;Exit Jeff Raikes, Enter Chris Peters&lt;/span&gt;&lt;/font&gt;&lt;/b&gt;&lt;/h3&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;Feature parity problem solved.&amp;nbsp; Well, not quite.&amp;nbsp; At the same time, Jeff Raikes was promoted from Word business unit manager to some other position in Microsoft (I forget exactly which), and Chris Peters was promoted to fill Jeff Raikes&amp;rsquo; position.&amp;nbsp; Most everyone knows about Jeff Raikes these days.&amp;nbsp; Chris Peters, however, had been the development manager for Excel before moving to Word.&amp;nbsp; His favorite pastime is bowling, and he was known for having huge stacks of empty Coke cans in his office.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;While Jeff Raikes thought the Pyramid project as a good idea, Chris Peters looked at the Word Perfect problem and decided that Pyramid was a bad way to solve the feature parity problem.&amp;nbsp; A complete code rewrite is risky.&amp;nbsp; The whole point of a complete rewrite is to take a few steps backward in the short-run in order to be able to make some greater strides in the long-run.&amp;nbsp; Chris Peters decided that we couldn&amp;rsquo;t afford to take the short-run hit that Pyramid required.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;So, Chris Peters killed Pyramid.&amp;nbsp; At that point, the only way to solve the feature parity issue is to start both Mac Word and Win Word from the Win Word 2.0 code base, which is exactly what we did.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;But, that&amp;rsquo;s not the full effect of Chris Peters&amp;rsquo; decision. &amp;nbsp;At the time Chris Mason was the development manager for Word, and he strongly disagreed with Chris Peters&amp;rsquo; decision.&amp;nbsp; As a result, Chris Mason left the Word group to work on other things at Microsoft.&amp;nbsp; Chris Mason understood the Mac, and had been a Word developer going back to Mac Word 3.0.&amp;nbsp; Chris Mason was replaced by Ed Fries, who was far less of a Mac person than Chris Mason was, so we lost a good bit of Mac understanding in the higher-level management of the Word group.&amp;nbsp; While it&amp;rsquo;s impossible to say exactly what effect this had, there&amp;rsquo;s a high probability that some of the trade-offs we made with Mac Word 6.0 would have gone in a different direction.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;h3&gt;&lt;b&gt;&lt;font size="4" face="Garamond"&gt;&lt;span style='font-size:14.0pt'&gt;Technical Hurdles&lt;/span&gt;&lt;/font&gt;&lt;/b&gt;&lt;/h3&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;Starting from the Win Word 2.0 code base presented a couple of technical problems for those of us on the Mac side.&amp;nbsp; The first was that it was written to the Windows APIs.&amp;nbsp; Solving this problem isn&amp;rsquo;t simply a matter of writing a layer that emulates the Windows APIs on the Mac.&amp;nbsp; The way the two systems handle windows are fundamentally different, though it&amp;rsquo;s interesting to note that the new Carbon APIs are far more similar to the way Windows does things.&amp;nbsp; The biggest problem is that Windows has the concept of child windows, while the Mac does not.&amp;nbsp; The other is that, on Windows, everything is a subclass of the Window object.&amp;nbsp; Even controls are Windows.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;The other problem was a limitation in the Mac OS.&amp;nbsp; While 68K Classic Mac OS was a nice operating system, it had one very glaring flaw.&amp;nbsp; It didn&amp;rsquo;t do memory management very well.&amp;nbsp; In fact, it barely did any memory management at all.&amp;nbsp; Users had to tell the OS how much memory a program needed in order to run, and that&amp;rsquo;s how much memory the program got regardless of what the program might need at any given time during execution.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;The memory problem was worse on 68K machines, because the memory given to a program, regardless of the virtual memory settings, was what the program got to use for both code and data.&amp;nbsp; Under 68K, code was contained in something called a &amp;ldquo;Code Resource&amp;rdquo;.&amp;nbsp; Now, you could swap these code resources in and out of memory as needed, which meant that the actual memory needs of your program could change drastically depending on what the user wanted to do.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;For example, consider a grammar checker.&amp;nbsp; The user isn&amp;rsquo;t going to want to check grammar all the time, so the grammar checker doesn&amp;rsquo;t need to be loaded into memory all the time.&amp;nbsp; But a grammar checker isn&amp;rsquo;t a simple piece of code.&amp;nbsp; It&amp;rsquo;s a memory pig.&amp;nbsp; The way 68K Classic Mac OS handled memory meant that you had to set a minimum amount of memory for your application such that you could load that memory pig of a grammar checker.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;I&amp;rsquo;m making a distinction between 68K Classic Mac OS and PowerPC Classic Mac OS, because Apple changed how code was stored, loaded and executed on the PowerPC.&amp;nbsp; For those of you who remember, when you did Get Info on an application, it would show you two different memory requirements: one with virtual memory turned on and one with virtual memory turned off.&amp;nbsp; With virtual memory turned on, the application&amp;rsquo;s code could be handled through something called &amp;ldquo;demand paged&amp;rdquo; virtual memory, so the code no longer had to fit in the application&amp;rsquo;s memory partition.&amp;nbsp; That notorious grammar checker didn&amp;rsquo;t have to be given account when trying to figure out the application&amp;rsquo;s minimum memory requirements.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;I want to be careful, here, not to lay blame for this at Apple&amp;rsquo;s feet.&amp;nbsp; Doing true virtual memory requires hardware support.&amp;nbsp; Microprocessors in 1984 didn&amp;rsquo;t have the full functionality required to support full demand paged virtual memory, so designing it into the original Mac OS would have been a waste of time.&amp;nbsp; We often make design decisions that make perfect sense in light of current system limitations, only to have those design decisions come back to haunt us when Moore&amp;rsquo;s Law makes those systems orders of magnitude more powerful.&amp;nbsp; There&amp;rsquo;s a reason Apple scrapped the Motorola 68K line of processors in favor of the PowerPC, not the least of which is the fact that it afforded them an opportunity to revisit some of those early design decisions.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;h3&gt;&lt;b&gt;&lt;font size="4" face="Garamond"&gt;&lt;span style='font-size:14.0pt'&gt;Technical Achievement&lt;/span&gt;&lt;/font&gt;&lt;/b&gt;&lt;/h3&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;Having reaped the benefits of a decade&amp;rsquo;s worth of Moore&amp;rsquo;s Law, we who now think very little of putting 128 MB or even a half a GB of memory into a laptop computer might find it difficult to grasp just how much of a problem the 68K memory wall presented for Mac Word 6.0.&amp;nbsp; But we were trying to get the whole thing to run in 4 MB of memory&amp;mdash;that&amp;rsquo;s total system memory, not just the application partition.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;This was no small matter.&amp;nbsp; Word 6 was getting a bevy of new features over and above Win Word 2.0.&amp;nbsp; Relative to Mac Word 5.0, this was two major releases worth of feature changes.&amp;nbsp; OLE, the built-in lexical analyzer and rule-based inference engine required for AutoCorrect/AutoFormat and a grammar checker that included state-of-the-art natural language processing technology (which made the grammar checker even more of a memory pig) combined with things like a full-blown macro language (WordBasic) to make Mac Word 6.0 huge relative to common Mac systems of that time.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;Please note the &amp;ldquo;relative&amp;rdquo; qualifier to the word &amp;ldquo;huge&amp;rdquo; back there.&amp;nbsp; To see this in perspective, fire up BBEdit on your Mac OS X machine, open the Terminal window, and type &amp;ldquo;top&amp;rdquo; at the command line.&amp;nbsp; Now read the values in the RSIZE and VSIZE columns.&amp;nbsp; When I open my .tcshrc file in BBEdit, those values are 12.1 MB and 164 MB respectively.&amp;nbsp; As I type this document into my most recent build of Word 2004, those values are 36.6 MB and 222 MB respectively&amp;mdash;and Word&amp;rsquo;s a full-blown word processor.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;The amazing thing is that we actually managed to get Word 6.0 to run on systems that had only 4 MB of memory (well, &amp;ldquo;walk&amp;rdquo; might be a better word than &amp;ldquo;run,&amp;rdquo; but you get the point).&amp;nbsp; To fully grasp the extent of this achievement, we need to understand a little bit about how programs are written and how they execute.&amp;nbsp; What follows is my attempt to explain a fairly technical issue in lay terms.&amp;nbsp; If your eyes start rolling into the back of your head, feel free to jump ahead to the next section.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;Programs are written in relatively small chunks of code called &amp;ldquo;functions.&amp;rdquo;&amp;nbsp; Each function represents a single, functional aspect of the program.&amp;nbsp; Functions can represent high-level concepts (e.g. layout a page of text) or low-level concepts (format a single line of text within a page).&amp;nbsp; Higher-level functions perform their work by calling lower-level functions, and there&amp;rsquo;s a protocol that helps the computer to know how to return from a low-level function back to the high-level function that called it.&amp;nbsp; This protocol is known as &amp;ldquo;procedure prologue and epilogue&amp;rdquo; and it involves something known as a &amp;ldquo;call stack.&amp;rdquo;&amp;nbsp; While the lower-level code is running, the higher-level code that called it is said to be &amp;ldquo;on the call stack.&amp;rdquo;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;Trying to get a body of code to run in a memory space that&amp;rsquo;s smaller than the code itself involves something called code swapping.&amp;nbsp; This is generally very easy to do if the code that you&amp;rsquo;re swapping out doesn&amp;rsquo;t cross these high-level to low-level boundaries.&amp;nbsp; Our grammar checker is a good example.&amp;nbsp; It represents a distinct functional unit, so we can swap the grammar checker&amp;rsquo;s code out of memory if we no longer need that code around without having to worry about swapping it back in when we&amp;rsquo;re done executing the current chunk of code.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;But, we can group code at a level of granularity that crosses high-level to low-level functional boundaries.&amp;nbsp; For example, the code that lays out a page of text can be in one module (or code segment), while the code that formats a single line of text can be in another module.&amp;nbsp; When you&amp;rsquo;re laying out a single line of text, you really don&amp;rsquo;t need the code that lays out the whole page in memory.&amp;nbsp; Conceptually, at least, you can swap out the page layout code while running the format line code.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;There&amp;rsquo;s a problem with this idea: the page layout code calls the format line code, which means that the page layout code is still on the call stack.&amp;nbsp; When the format line code is finished, the protocol that allows computer to know how to return execution back to the page layout code needs to know that the page layout code is no longer in memory.&amp;nbsp; This is such a difficult problem that Apple&amp;rsquo;s documentation claimed that it was simply not possible to swap out code that was still on the call stack.&amp;nbsp; Yet, this is exactly what we were able to do with Word 6.0&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;There is an unfortunate downside to being able to swap out code that&amp;rsquo;s on the call stack.&amp;nbsp; It leads to something called thrashing.&amp;nbsp; Consider our page layout/format line example.&amp;nbsp; Page layout works by calling format line for each line of text on the page.&amp;nbsp; Every time we cross the boundary between the page layout code and the format line code, we need to stop and load a chunk of code into memory, which will, in turn, require removing another chunk of code from memory.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;Now, I&amp;rsquo;ve grossly oversimplified the whole process in order to explain what was going in.&amp;nbsp; The swapping algorithm is a bit smarter about deciding what parts of the program to swap out of memory in order to be able to swap in a piece of code that&amp;rsquo;s needed immediately.&amp;nbsp; In practice, then, it&amp;rsquo;s highly unlikely that page layout and format line would ever thrash by themselves.&amp;nbsp; Nonetheless, thrashing does occur when the available memory is small enough.&amp;nbsp; When the system thrashes like this, performance goes down the toilet.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;h3&gt;&lt;b&gt;&lt;font size="4" face="Garamond"&gt;&lt;span style='font-size:14.0pt'&gt;Learning the Meaning of &amp;ldquo;Mac-Like&amp;rdquo;&lt;/span&gt;&lt;/font&gt;&lt;/b&gt;&lt;/h3&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;OK, so Mac Word 6.0 was big and slow relative to the memory that most computers had available at the time we shipped it, but that&amp;rsquo;s not the reason why Mac Word 6.0 was such a crappy product, or at least not directly.&amp;nbsp; Not long after Word 6.0 shipped, people could afford to add more memory to accommodate the added features of Mac Word 6.0.&amp;nbsp; Those people who found those features to be very useful, and you&amp;rsquo;ll run into a few of them even today, felt that the cost of the added memory was worth the work-savings that those features afforded them.&amp;nbsp; Moore&amp;rsquo;s Law, and the PowerPC, would have solved the memory problem in due time.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;Moreover, while people complained about the performance, the biggest complaint we kept hearing about Mac Word 6.0 was that it wasn&amp;rsquo;t &amp;ldquo;Mac-like.&amp;rdquo;&amp;nbsp; So, we spent a lot of time drilling down into what people meant when they said it wasn&amp;rsquo;t &amp;ldquo;Mac-like.&amp;rdquo;&amp;nbsp; We did focus groups.&amp;nbsp; Some of us hung out in various Usenet newsgroups.&amp;nbsp; We talked to product reviewers.&amp;nbsp; We talked to friends who used the product.&amp;nbsp; It turns out that &amp;ldquo;Mac-like&amp;rdquo; meant Mac Word 5.0.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;We spent so much time, and put so much effort into, solving all the technical problems of Mac Word 6.0 that we failed to make the UI of Mac Word 6.0 behave like Mac Word 5.0.&amp;nbsp; As a result there were many differences, some little, some huge and even some that were simply gratuitous, between the way Mac Word 6.0 did things and the way Mac Word 5.0 did things.&amp;nbsp; The end result was a UI that could only be described as clunky relative to Mac Word 5.0&amp;rsquo;s elegance.&amp;nbsp; More importantly, Mac Word users had to unlearn all the ways they had come to do certain things, and relearn the Word 6.0 way of doing them.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;My favorite example of this is they way you defined styles.&amp;nbsp; In Mac Word 5.0, style definition was a semi-modal task.&amp;nbsp; You defined or modified a style the same way you changed the font or paragraph properties in the document itself.&amp;nbsp; In Mac Word 6.0, the task was completely modal.&amp;nbsp; The entire array of menus and toolbar buttons that you could use in Mac Word 5.0 (and with which you were quite familiar as a user) was replaced by a single drop-down menu in the New/Modify style dialog box.&amp;nbsp; Even today, you can&amp;rsquo;t use the Formatting Palette to change the font or paragraph information in a style in Word 2001 or Word X, and this remains one of the things I want to fix in Word before I leave MacBU.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;The other thing we figured out as a result of coming to understand what &amp;ldquo;Mac-like&amp;rdquo; meant was that we weren&amp;rsquo;t going to be able to deliver &amp;ldquo;Mac-like&amp;rdquo; products if Office remained a singular product from which both the Win and Mac versions were built.&amp;nbsp; The mere fact that &amp;ldquo;Mac-like&amp;rdquo; was an issue at all meant that there were some fundamental differences between the Win Word market and the Mac Word market.&amp;nbsp; If we were to understand both those markets, then our Mac products and Win products needed separate marketing and PGM organizations.&amp;nbsp; The lessons we learned from Mac Word 6.0 are some of the reasons that Mac BU exists today.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;We still bang our heads against the wall from time to time.&amp;nbsp; Understanding users isn&amp;rsquo;t an exact science.&amp;nbsp; But, we do it far less often than we used to.&amp;nbsp; And it really does feel much better.&amp;nbsp; In a future post, I&amp;rsquo;ll describe in more detail how we go about trying to understand both our current users and potential new users.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;As for my own role in Mac Word 6.0, I was responsible for the PowerPC port.&amp;nbsp; But that&amp;rsquo;s also a story for another post.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;Lastly, as for how I felt about the demise of Pyramid, all during the Word 97 project, I kept six empty Mac Word 6.0 boxes stacked in a vertical triangle next to my desk.&amp;nbsp; I called it a slice out of a pyramid.&amp;nbsp; A few people got the point.&amp;nbsp; And the boxes when into recycling as soon as Mac BU was formed and we started work on Word 98.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;Rick&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3" face="Garamond"&gt;&lt;span style='font-size:12.0pt;font-family:Garamond'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=80193" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/History/default.aspx">History</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Microsoft+Word/default.aspx">Microsoft Word</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Mac+BU/default.aspx">Mac BU</category></item><item><title>Hungarian Notation</title><link>http://blogs.msdn.com/rick_schaut/archive/2004/02/14/73108.aspx</link><pubDate>Sat, 14 Feb 2004 22:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:73108</guid><dc:creator>Rick Schaut</dc:creator><slash:comments>10</slash:comments><comments>http://blogs.msdn.com/rick_schaut/comments/73108.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rick_schaut/commentrss.aspx?PostID=73108</wfw:commentRss><description>&lt;DIV class=Section1&gt;
&lt;P class=MsoNormal&gt;My dad always used to say, &amp;#8220;Call me anything you want. Just don&amp;#8217;t call me late for dinner.&amp;#8221; If variables and functions in computer programs were sentient beings, I wonder if they&amp;#8217;d say the same thing. As religious wars go among computer programmers, wars over naming conventions rank right up there with wars over favorite programming languages and favorite text editors.&lt;/P&gt;
&lt;P class=MsoNormal&gt;Over the years, I&amp;#8217;ve grown accustomed to various flame wars, and generally steer clear. But when I see flame wars over Hungarian Notation, I want to scream. You see, there are really two distinct naming conventions known as Hungarian Notation. I like to refer to them as Hungarian Notation and Anti-Hungarian Notation. The participants in these flame wars think they&amp;#8217;re talking about Hungarian Notation, but they&amp;#8217;re really flaming over Anti-Hungarian Notation. And &lt;I&gt;that&amp;#8217;s&lt;/I&gt;&lt;SPAN style="FONT-STYLE: normal"&gt; why I want to scream.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;The difference between HN and A-HN is the story of two Charles&amp;#8217;&amp;#8212;Charles Simonyi and Charles Petzold. While I&amp;#8217;m fairly versed in the Charles Simonyi story, I really have little knowledge of how the naming convention that Charles Simonyi outlined in his &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvsgen/html/hunganotat.asp"&gt;original paper&lt;/A&gt; metamorphosed into the naming convention that Charles Petzold described in &lt;I&gt;Programming Windows&lt;/I&gt;&lt;SPAN style="FONT-STYLE: normal"&gt;. Perhaps &lt;A href="http://blogs.msdn.com/oldnewthing/"&gt;Raymond Chen&lt;/A&gt; can fill us in on the details. They are, no doubt, sordid.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Whatever the details, they quite likely involve a misunderstanding fostered by an unfortunate choice of wording in Simonyi&amp;#8217;s original paper. Not really Simony&amp;#8217;s fault. After all, his native language is Hungarian, not English. While Simony talked about the &amp;#8220;type&amp;#8221; of a variable, he clearly wasn&amp;#8217;t talking about the underlying language type of a given variable. He was talking about &amp;#8220;type&amp;#8221; in the sense of the operations that can be performed on a given variable. I like to refer to Simonyi&amp;#8217;s concept of &amp;#8220;type&amp;#8221; as the &amp;#8220;functional type&amp;#8221; of a variable, as opposed to the variable&amp;#8217;s &amp;#8220;language type&amp;#8221; as is often meant when people use the word &amp;#8220;type&amp;#8221; in conjunction with Hungarian Notation.&lt;/P&gt;
&lt;P class=MsoNormal&gt;As Simonyi points out, a program written in C might have a function called, &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;Position(int x, int y)&lt;/SPAN&gt;&lt;/SPAN&gt;. The variables &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;x&lt;/SPAN&gt;&lt;/SPAN&gt; and &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;y&lt;/SPAN&gt;&lt;/SPAN&gt;, which both have an underlying language type of &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;int&lt;/SPAN&gt;&lt;/SPAN&gt;, may well have distinctly different functional types. If &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;x&lt;/SPAN&gt;&lt;/SPAN&gt; and &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;y&lt;/SPAN&gt;&lt;/SPAN&gt; represent different dimensions in coordinate space, for example, it wouldn&amp;#8217;t make sense to write, &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;Position(y, x)&lt;/SPAN&gt;&lt;/SPAN&gt;. The point, however, is that the variable names, &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;x&lt;/SPAN&gt;&lt;/SPAN&gt; and &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;y&lt;/SPAN&gt;&lt;/SPAN&gt;, conform to Simonyi-style Hungarian Notation.&lt;/P&gt;
&lt;P class=MsoNormal&gt;Now, one way to metamorphose from Simonyi-style HN to Petzold-style HN, is to create unique user-defined language types for distinct functional types. In the above example, one might well say:&lt;/P&gt;
&lt;P class=CodeBlock&gt;typedef int X;&lt;/P&gt;
&lt;P class=CodeBlock&gt;typedef int Y;&lt;/P&gt;
&lt;P class=CodeBlock&gt;void Position(X x, Y y);&lt;/P&gt;
&lt;P class=MsoNormal&gt;Using this technique, we can maintain a one-to-one correspondence between the language type and the functional type, with the added benefit of being able to change the actual underlying language type of variables with functional types &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;X&lt;/SPAN&gt;&lt;/SPAN&gt; and &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;Y&lt;/SPAN&gt;&lt;/SPAN&gt; without having to perform a massive search/replace through all the code.&lt;/P&gt;
&lt;P class=MsoNormal&gt;The one thing that Simonyi-style HN would &lt;I&gt;not&lt;/I&gt;&lt;SPAN style="FONT-STYLE: normal"&gt; countenance would be the A-HN form of &lt;/SPAN&gt;&lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;Position(int iX, int iY)&lt;/SPAN&gt;&lt;/SPAN&gt;, because the &amp;#8220;&lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;i&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;#8221; prefix doesn&amp;#8217;t tell us anything about how &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;iX&lt;/SPAN&gt;&lt;/SPAN&gt; and &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;iY&lt;/SPAN&gt;&lt;/SPAN&gt; are used. It&amp;#8217;s pointless information&amp;#8212;decorations added by someone who really doesn&amp;#8217;t understand the point of Simonyi-style HN.&lt;/P&gt;
&lt;P class=MsoNormal&gt;For those of us who have grown accustomed to Simonyi-style HN, the whole &amp;#8220;&lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;i&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;#8221; means &amp;#8220;&lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;int&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;#8221; prefix thing is doubly horrible, because the &amp;#8220;&lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;i&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;#8221; prefix in Simonyi-style HN is commonly understood to be an index into an array. If I put a character into an &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;int&lt;/SPAN&gt;&lt;/SPAN&gt;, I&amp;#8217;m not going to call it &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;iCh&lt;/SPAN&gt;&lt;/SPAN&gt;. I&amp;#8217;m just going to call it &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;ch&lt;/SPAN&gt;&lt;/SPAN&gt;. To me, an &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;ich&lt;/SPAN&gt;&lt;/SPAN&gt; is an index to a character in an array of characters.&lt;/P&gt;
&lt;P class=MsoNormal&gt;Now, I&amp;#8217;m a Word guy. Word has device-independent layout, where text layout is done in a coordinate space based on the design units of the font, which means that we often have to convert between layout coordinates and window coordinates. Being able to type &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;XwFromXl&lt;/SPAN&gt;&lt;/SPAN&gt; sure beats the pants off having to type something like &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;HorizLayCoordToHorizWinCoord&lt;/SPAN&gt;&lt;/SPAN&gt;.&lt;/P&gt;
&lt;P class=MsoNormal&gt;But, I&amp;#8217;m not here to add to the flame war. I&amp;#8217;m just trying to correct a wrong that&amp;#8217;s been allowed to fester for far too long. And, no, don&amp;#8217;t get me started on MFC. Let&amp;#8217;s just say that a good number of people who managed to not understand Charles Simonyi&amp;#8217;s original paper happened to work at Microsoft.&lt;/P&gt;
&lt;P class=MsoNormal&gt;So, now the &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconeventnamingguidelines.asp"&gt;.NET guidelines&lt;/A&gt; are steering people away from using Hungarian Notation, or more accurately Anti-Hungarian Notation, quite likely because it&amp;#8217;s too late to correct years of bad practices. Better to just cut one&amp;#8217;s losses. That&amp;#8217;s something of a shame, because Simonyi-style Hungarian Notation was the basis leading a certain &lt;A href="http://blogs.msdn.com/rick_schaut/archive/2004/02/12/72293.aspx"&gt;Excel developer&lt;/A&gt; to devise such function names as &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;CleanPots&lt;/SPAN&gt;&lt;/SPAN&gt; and &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;FreePot&lt;/SPAN&gt;&lt;/SPAN&gt; (a &lt;SPAN class=Code&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;POT&lt;/SPAN&gt;&lt;/SPAN&gt; being a &amp;#8220;piece &amp;#8216;o&amp;#8217; text&amp;#8221;).&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Rick&lt;/P&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=73108" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/History/default.aspx">History</category><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/Programming/default.aspx">Programming</category></item><item><title>Ed Fries</title><link>http://blogs.msdn.com/rick_schaut/archive/2004/02/12/72293.aspx</link><pubDate>Fri, 13 Feb 2004 05:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:72293</guid><dc:creator>Rick Schaut</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/rick_schaut/comments/72293.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rick_schaut/commentrss.aspx?PostID=72293</wfw:commentRss><description>&lt;html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40"&gt;

&lt;head&gt;
&lt;meta name=Title
content="Ed Fries is retiring from Microsoft, and last night we held a little shindig to send him off"&gt;
&lt;meta name=Keywords content=""&gt;
&lt;meta http-equiv=Content-Type content="text/html; charset=macintosh"&gt;
&lt;meta name=ProgId content=Word.Document&gt;
&lt;meta name=Generator content="Microsoft Word 11"&gt;
&lt;meta name=Originator content="Microsoft Word 11"&gt;
&lt;link rel=File-List href="EdFries_files/filelist.xml"&gt;
&lt;title&gt;Ed Fries is retiring from Microsoft, and last night we held a little
shindig to send him off&lt;/title&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:DocumentProperties&gt;
  &lt;o:Author&gt;Rick Sch&amp;aacute;ut&lt;/o:Author&gt;
  &lt;o:Template&gt;Normal&lt;/o:Template&gt;
  &lt;o:LastAuthor&gt;Rick Sch&amp;aacute;ut&lt;/o:LastAuthor&gt;
  &lt;o:Revision&gt;5&lt;/o:Revision&gt;
  &lt;o:Created&gt;2004-02-13T05:15:00Z&lt;/o:Created&gt;
  &lt;o:LastSaved&gt;2004-02-13T05:21:00Z&lt;/o:LastSaved&gt;
  &lt;o:Pages&gt;1&lt;/o:Pages&gt;
  &lt;o:Words&gt;258&lt;/o:Words&gt;
  &lt;o:Characters&gt;1476&lt;/o:Characters&gt;
  &lt;o:Company&gt;Micros&amp;oacute;ft Corp.&lt;/o:Company&gt;
  &lt;o:Lines&gt;12&lt;/o:Lines&gt;
  &lt;o:Paragraphs&gt;2&lt;/o:Paragraphs&gt;
  &lt;o:CharactersWithSpaces&gt;1812&lt;/o:CharactersWithSpaces&gt;
  &lt;o:Version&gt;11.0&lt;/o:Version&gt;
 &lt;/o:DocumentProperties&gt;
 &lt;o:OfficeDocumentSettings&gt;
  &lt;o:AllowPNG/&gt;
 &lt;/o:OfficeDocumentSettings&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:Zoom&gt;125&lt;/w:Zoom&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;
&lt;style&gt;
&lt;!--
 /* Font Definitions */
@font-face
	{font-family:"Times New Roman";
	panose-1:0 2 2 6 3 5 4 5 2 3;
	mso-font-charset:0;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:50331648 0 0 0 1 0;}
@font-face
	{font-family:Garamond;
	panose-1:0 2 2 4 4 3 3 1 1 8;
	mso-font-charset:0;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:50331648 0 0 0 1 0;}
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin-top:6.0pt;
	margin-right:0in;
	margin-bottom:6.0pt;
	margin-left:0in;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:Garamond;}
h1
	{margin-top:12.0pt;
	margin-right:0in;
	margin-bottom:3.0pt;
	margin-left:0in;
	mso-pagination:widow-orphan;
	mso-outline-level:1;
	font-size:14.0pt;
	font-family:Garamond;}
h2
	{margin-top:12.0pt;
	margin-right:0in;
	margin-bottom:3.0pt;
	margin-left:0in;
	mso-pagination:widow-orphan;
	mso-outline-level:2;
	font-size:12.0pt;
	font-family:Garamond;
	font-style:italic;}
h3
	{margin-top:12.0pt;
	margin-right:0in;
	margin-bottom:3.0pt;
	margin-left:0in;
	mso-pagination:widow-orphan;
	mso-outline-level:3;
	font-size:12.0pt;
	font-family:Garamond;}
table.MsoNormalTable
	{mso-style-parent:"";
	font-size:10.0pt;
	font-family:"Times New Roman";}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--&gt;
&lt;/style&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext="edit" spidmax="1027"/&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext="edit"&gt;
  &lt;o:idmap v:ext="edit" data="1"/&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body bgcolor=white lang=EN-US style='tab-interval:.5in'&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;Ed Fries is retiring from Microsoft, and last night we held
a little shindig to send him off. Ed&amp;rsquo;s accomplishments as head of the games
business unit are pretty well known and impressive. &lt;span style="mso-spacerun:
yes"&gt;&amp;nbsp;&lt;/span&gt;During his eight-year tenure, he shipped over 120 new titles,
of which 18 sold over a million copies. &lt;span style="mso-spacerun:
yes"&gt;&amp;nbsp;&lt;/span&gt;Were he in the music business, that would be 18 platinum CDs
in 8 years. &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;Ed was also
responsible for anything having to do with Xbox.&lt;/p&gt;

&lt;p class=MsoNormal&gt;Before Ed went off to run the games group, he was
development manager for Word. &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;Before
that, he was a lead developer in Excel. &lt;span style="mso-spacerun:
yes"&gt;&amp;nbsp;&lt;/span&gt;He was also one of the co-founders of Tom and Ed&amp;rsquo;s Bogus Software,
purveyors of the original &amp;ldquo;Fish!&amp;rdquo; screen saver. &lt;span style="mso-spacerun:
yes"&gt;&amp;nbsp;&lt;/span&gt;Their motto was, &amp;ldquo;A fish on every race track.&amp;rdquo;&lt;/p&gt;

&lt;p class=MsoNormal&gt;Ed invented DDE, and, as proof of concept, he wrote a
program that would send DDE messages to the Fish screen saver.&lt;span
style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The DDE messages would tell the screen
saver to create submarines that would shoot down the fish.&lt;/p&gt;

&lt;p class=MsoNormal&gt;Over all these things, however, I&amp;rsquo;ll always associate Ed
with the infamous &amp;ldquo;Swing around the Wing.&amp;rdquo; &lt;span style="mso-spacerun:
yes"&gt;&amp;nbsp;&lt;/span&gt;Ed used to set up miniature golf courses once a week in
building 8. &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;To play, you&amp;rsquo;d send Ed
an e-mail, and he&amp;rsquo;d group you up and send you a tee time.&lt;/p&gt;

&lt;p class=MsoNormal&gt;Of all the various stories I could tell about this, none is
quite capable of conveying the relaxed nature of the &amp;ldquo;Swing around the Wing&amp;rdquo;
than the story of the invention of the Osgood scale for measuring the depth of
a ding in the wall.&lt;/p&gt;

&lt;p class=MsoNormal&gt;Osgood was an intern, who stepped up for his first shot,
took a fairly hefty back swing, and toed the ball severely, at which point the
ball rocketed off at a 90 degree angle from the direction of his swing and
embedded itself in the wall next to him to a depth of nearly half the golf
ball.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;As Ed says, it was almost
perfection.&lt;/p&gt;

&lt;p class=MsoNormal&gt;Since then, a ding in the wall was always measured in
Osgoods, well, fractions of an Osgood. I don&amp;rsquo;t know of anyone who left a ding
deeper than even half an Osgood. &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;The
most common depth was 1/8&lt;sup&gt;th&lt;/sup&gt; of an Osgood.&lt;/p&gt;

&lt;p class=MsoNormal&gt;Yeah, I&amp;rsquo;ll miss you, Ed. &lt;span style="mso-spacerun:
yes"&gt;&amp;nbsp;&lt;/span&gt;And don&amp;rsquo;t forget the fish.&lt;/p&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=72293" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rick_schaut/archive/tags/History/default.aspx">History</category></item></channel></rss>