Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Bug Microsoft Programming Technology

Anatomy Of A Bug In Microsoft Office 642

bender writes "An insightful look at what it is like to track down and fix a bug in Microsoft Office is available from Microsoft's Blog site."
This discussion has been archived. No new comments can be posted.

Anatomy Of A Bug In Microsoft Office

Comments Filter:
  • Debugged humans eh? (Score:5, Interesting)

    by Rosco P. Coltrane ( 209368 ) on Friday August 27, 2004 @01:14PM (#10089837)
    One of my favorite Chris Mason quotes comes from that memo, "Since human beings themselves are not fully debugged yet, there will be bugs in your code no matter what you do."

    Then it would seem humans working at Microsoft are less debugged than everybody else. Because *boy*, at some point Microsoft was a bug factory.

    To their credit though, this is changing fast. Microsoft is a huge company that can turn on a dime, and they've understood that having shite engineers onboard won't do much good to their latest "trustworthy computing" PR stunt. Not to mention, they actually have a nice R&D shop now, not just the pretense of one anymore.
  • by newandyh-r ( 724533 ) on Friday August 27, 2004 @01:23PM (#10089920)
    "And, always remember that I can't fix what I can'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'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."
  • by tao_of_biology ( 666898 ) * <tao.of.biologyNO@SPAMgmail.com> on Friday August 27, 2004 @01:23PM (#10089924)
    From the article:
    • More than 850 command functions (e.g. Bold and Italic are the same command function)
    • More than 1600 distinct commands (e.g. Bold and Italic are distinct commands)
    • At any given time roughly 50% of these commands are enabled (conservative estimate)
    • With just 3 steps, the possible combinations of code execution paths exceeds 500 million

    Adding new features and abilities to Word would affect a complex system like this in totally unpredictable ways. And, trying to debug such a complex system seems like an almost impossibly complicated task.

    Now I know sarcastic answers will abound to this, but I wonder how much MS invests in testing such complicated programs? It has to be way, WAY more than they invest in the development of the program.

    Now, I'm no Microsoft fanboy, but I am seriously impressed with Word. It never crashes on me, features always work as expected with other features and the interface does rock. I had no idea how complex the program was, and I am even more awed.

    By the way, if you don't know much about complexity or chaos theory I recommend reading the following books to give you a nice appreciation of complex systems like this: COMPLEXITY [amazon.com] and CHAOS [amazon.com].

  • Nice Serveice: (Score:3, Interesting)

    by zulux ( 112259 ) on Friday August 27, 2004 @01:30PM (#10089970) Homepage Journal
    From on of the comments from the blog:



    By the way I did try to report the bug via our $500,000+/year global support contract with Microsoft, and was told directly by our Microsoft support representative, and I quote, "I wouldn't know how to file a bug report for that." Never was able to get it addressed, even though I had two good sample documents for reproduction of the problem.



    Half a million? No wonder Bill Gates has billions - He's not spending the money on developers.
  • by Akiba ( 589290 ) on Friday August 27, 2004 @01:42PM (#10090055)
    Very interesting read. One thing I have to dissagree with is about needing to see/reproduce a problem in order to fix it. It's true that not being able to reproduce makes finding a bug much harder but it's not impossible. As a server programmer I frequently have to debug race condition bugs, corruption bug or other problems that are not reproduceable at will. Sometimes good detective work can lead you to a find and sometime not. Often you end up having to add some diagnostic code that hopes to gather more information on the problem the next time someone encounters it. If it happened just once, often we cant fix it but then it's not that important... If it happens "once in a while" and/or "only in production at a large customer site" then we can usually fix it given enough time to work on it. I actually enjoy these kinds of bugs :-) -Akiba
  • by fatmonkeyboy ( 257833 ) on Friday August 27, 2004 @01:43PM (#10090066) Homepage
    Haha. You even got +5, Insightful. Why don't we look at the rest of the sentence?

    Brodie figured out that a document is really just a collection of pieces of text, and that it didn't really matter where each piece of text is physically located within the document's file.

    I.e., if you're going to have "The dog is red." appears in the document, it doesn't matter if "The" occurs in the file before "red", or vice-versa.

    Maybe this seems trivial to you, but I think most of us when designing a document format would try to put "The" before "dog", by instinct. It makes sense.

    So what he figured out is not as straightforward as your out-of-context quotation makes it out to be. He was, at least, being a little creative. The article then goes onto explain multiple ways in which this design was useful in Word processing software.

    I realize you're just being an asshole and that you probably didn't read the article, but just looked for a way to use it to make fun of Microsoft. "Standard Operating Procedure" at Slashdot, I know.

    But, moderators, this guy doesn't deserve Insightful. He should be Flamebait.
  • by wfberg ( 24378 ) on Friday August 27, 2004 @01:43PM (#10090067)
    They spent years in the dark that the "disk is full" error was caused by too many open files.
    You'd think that if the disk isn't actually full, you'd look at other places that can generate that error. Even though obviously the error should have been along the lines of "too many open files".

    Note that this underlying problem isn't just a technical one. You get over-general error messages on windows (and with various badly designed software) all the time.

    The least you can do when you pop-up an error is to give some additional information; like where it occurred ("Bad Thing Happened in somefile.c line #456"), so even if, like in this case, you can't reproduce the error in a debugger, you know where the error got kicked into being. Not quite as useful as a full stacktrace like in Java, but pretty usefull.

    Compare this to how (non-Microsoft) geeks write error codes; from man ep;

    ep0: 3c509 in test mode. Erase pencil mark!

    This means that someone has scribbled with pencil in the test area on the card. Erase the pencil mark and reboot. (This is not a joke).


    Even if you don't understand the error code, at least you can google for its pretty unique description "erase pencil mark".
  • by Mattintosh ( 758112 ) on Friday August 27, 2004 @01:50PM (#10090138)
    Around the office I work in, Clippy (and all his friends!) exists only in removable installer media form. Really, folks. It's dirt-fricking-simple to just do a "custom" install of Office and change the Office Shared>Office Assistant option to "Not Available".

    Hell, while you're in the custom install window, save some HD space by not installing language packs and fonts for languages you don't use. And if you're really uptight about macro viruses and such, just remove VBA. It's all just an installer option away. And you don't even have to edit a config file, which is more than I can say for a stable, non-corrupt installation of (cringe)Peachtree Accounting(/cringe).
  • Open Office (Score:2, Interesting)

    by Depris ( 612363 ) on Friday August 27, 2004 @01:54PM (#10090170)
    Open Office has crashed on me many more times than Word. I agree that Word is cluddered but their are many other people that use all those features. I tried Open Office... it crashed a lot, and even if it didn't I'm not all that impressed by it. It's basically Word with less (much less) features and it crashes more often (at least for me). I too am no microsoft fanboy, I'm not a fan boy of everything really. I like everything. Open Office is nice but their is a difference between being better and exaggerating something to fit ones own agenda. Personally I haven't seen anything come out of open source that doesn't have an equal closed source alternative. (in terms of each has it's goods and it's bads.)
  • Comment removed (Score:5, Interesting)

    by account_deleted ( 4530225 ) on Friday August 27, 2004 @01:55PM (#10090177)
    Comment removed based on user account deletion
  • by Anonymous Coward on Friday August 27, 2004 @01:58PM (#10090198)
    When I read the GoF book (patterns book), it is full of examples from the 80's and 90's of how to do multiple undo (command pattern), how to even use flyweight objects to track each individual character.

    There are plenty of examples from NeXT, from research project, .. very few references to Microsoft anything in this book.

    20 years ago there was experience to draw on.. Microsoft just lives in a big bubble world where they re-invent things their own particular way.
  • by alispguru ( 72689 ) <bob@bane.me@com> on Friday August 27, 2004 @01:58PM (#10090203) Journal
    If you have auto-save turned on (it's on by default in Word for OS X), Word saves at N-minute intervals behind your back, and you get the same buggy behavior as you do when you do it manually. All you have to do is leave a document open for a long time.

    I was asked by my supervisors to try and use MS tools to minimize their grief in reading my output. So, while I was debugging a program on a remote machine (via X11), I left a Word document open for my notes. After a few days, I suddenly couldn't save any more. I gave up and started keeping my notes in an emacs buffer (which has infinite undo, and can stay up for days with no trouble - go figure).

    I remember thinking at the time, "this has got to be a file-handle leak problem". I'm surprised to see I was right!
  • Disagree (Score:1, Interesting)

    by Anonymous Coward on Friday August 27, 2004 @02:00PM (#10090228)
    I'm more a fan of Windws than Office. I find word (the only one I have much experience with) to be a complete pain in the butt that keeps sticking in options I didn't want.
    I much prefer something much more simplistic, like ABI. But my documents are usually just 4-10 page papers, nothing impressive or fancy so I really don't need much at all.

    I think those special needs people often get sick of some of the extra features that other special needs people use. Maybe Microsoft should have multiple versions of Word? Or at least, multiple modes.
  • by fireboy1919 ( 257783 ) <rustyp AT freeshell DOT org> on Friday August 27, 2004 @02:03PM (#10090260) Homepage Journal
    Obviously you've never tried to make big documents with Word.

    Writing a book with pictures in Word is extremely difficult. It randomly moves stuff around, changes fonts, and deletes sections of the code when you exceed somewhere around 2MB file size (or 10 pages...I'm not really sure about the limit).

    The interface isn't the whole problem either. Exporting to rtf format creates files that don't actually meet the rtf specification (which has been defined by Microsoft, by the way), so have errors (even when read by Microsoft's rtf importer), and html output is even worse.

    Latex has more features than Word without any of these problems. Also, given the original "find a bug and win money" challenge, I think I can say it is probably one of the most stable pieces of software on the planet, and it has an extension mechanism built in (Word does too, by the way - several of them).

    There are some things that Microsoft makes that beat the competition, but I don't think that Word is one of them.
  • Re:But... (Score:2, Interesting)

    by mchawi ( 468120 ) on Friday August 27, 2004 @02:07PM (#10090294)
    Ooooh...I hate when my HTML files do that. That's why I only use Notepad for HTML editing. You think Word is bad with what it does to HTML though? Try Frontpage....

    Never had any of the other issues though.
  • by goynang ( 680067 ) on Friday August 27, 2004 @02:08PM (#10090320)
    Sounds like the sort of pokey debugging processes I go through writing little programs in my spare time!

    What about stuff like Test Driven Development and Unit Testing? Would that have made any odds here?
  • Re:Disagree (Score:3, Interesting)

    by dustinbarbour ( 721795 ) on Friday August 27, 2004 @02:14PM (#10090373) Homepage
    In regards to AbiWord.. I absolutely love the philosophy of starting with just the basics and allowing your users to add the fucntionality they need via plugins. Firefox is the best example of this, IMO. AbiWord is the same. The Abi installer is only 5 MB. I love it!
  • Re:But... (Score:5, Interesting)

    by mandos ( 8379 ) on Friday August 27, 2004 @02:15PM (#10090379) Homepage
    I call BS on this. I've not been a fan of MS for years, but recently I had to write a business plan and due to decisions out of my control I had to do it in Word and Excel. I am quite good with both but have generally avoided using them since my previous job of training others to use them. After extensive use I can tell you that they are NOT better, people just are willing to put up with more shit from MS. If it's not from MS it has to be perfect, just to be considered. All MS's hand waving about being able to conviently put Excel charts and such in Word documents is BS. It can be done, but not with out a lot of effort to make it worthwhile. I prefer OpenOffice and am more then willing to admit it has issues. However, whenever I have to choose between the two, I'll take the latest version OpenOffice.
  • Re:Bug Triage (Score:5, Interesting)

    by TedCheshireAcad ( 311748 ) <ted AT fc DOT rit DOT edu> on Friday August 27, 2004 @02:21PM (#10090445) Homepage
    Do you realize how many essential web components, many of them from companies that are now out of business, would stop working if ActiveX were turned off altogether?

    There is no excuse, ever, for using ActiveX. If your web site depends on or even uses ActiveX, you need to hang yourself from your server rack with a cat5 cable.

    ActiveX is not cross platform, and therefore by no means suitable for web purposes. If you can't accomplish the task with DHTML/JavaScript, then you need to find another way.

    As for the atrocity against humanity that is stateful programs embedded into web sites, if you're going to commit the crime, Java better be your weapon of choice.
  • by MattRog ( 527508 ) on Friday August 27, 2004 @02:21PM (#10090448)
    Actually, Codd theorized this in the Relational Model back in the late 60's (published in 1970). He realized the necessity for logical/physical data representation separation and formulated a data model around it. It's a shame that people are only now starting to realize that it was a very, very good idea.

    Although he was probably not the first person to arrive at the "data abstraction" idea he was the first to propose a general (that is to say it applies to any data) theory of data which required it.
  • Comment removed (Score:3, Interesting)

    by account_deleted ( 4530225 ) on Friday August 27, 2004 @02:26PM (#10090498)
    Comment removed based on user account deletion
  • Re:Just a thought (Score:3, Interesting)

    by TedCheshireAcad ( 311748 ) <ted AT fc DOT rit DOT edu> on Friday August 27, 2004 @02:29PM (#10090532) Homepage
    In the end of the day we are talking engineers, not scientists with their head in the clouds.

    And your job still went to India.
  • Re:But... (Score:2, Interesting)

    by MolarMass ( 808031 ) on Friday August 27, 2004 @02:56PM (#10090776)
    I've used OpenOffice.org exclusively for nearly a year, and it suits my purposes fine - not perfectly, as any regular user of OO.org surely knows. There's little reason for a home user (or student) to need to pay so much for MS Office (or even just Word alone) when basic functionality is all that's required (Though I will admit that the 'education' edition of Office with a 3 computer license is pretty affordable).

    Honestly, I feel many more people would adopt OO.org if they were shown (probably physically, because telling somebody will do little to persuade them) that it existed. Especially if they are informed that you don't have to pay hundreds of dollars.

    Perhaps, eventually, there will be a major PC vendor that would do something so bold as to offer OO.org on a preconfigured computer as an alternative to MS Office.

  • Re:Just a thought (Score:4, Interesting)

    by CharlieG ( 34950 ) on Friday August 27, 2004 @03:04PM (#10090849) Homepage
    Your right on this, and sometimes a bug just isn't worth fixing!!!

    WAY back when, in the dark days of 386s and early 486s, I wrote an application that was the best selling product in it's (admittedly) small nitche vertical market.

    One day, we get a call - there is a bug in printing that NO one else could duplicate. It took me a week to run down the following

    It required you to:
    Be running on an IBM PS/2 Model 80 (Yes, the Microchannel one)
    Be using an HP Laserjet II
    Be using a MICROCHANNEL HP "Jet Direct Card" (a card that allowed the raster rip to be done on the PC instead of the HPIIs memory for greater speed)
    Be running with a particular resolution

    As the Model 80 was never a BIG seller, and neither was the Microchannel Jet Direct Card, we determined that it just was NOT worth fixing - we DID offer to fix the bug is they would send us the hardware. If the guy used the printer port, it worked fine (I assume it was a strange driver "feature" I would have had to work around)

    The client I wrote the software cheerfully offered the end user a full refund on the software.... The client decided to keep the software, and use his printer port. We never did fix that bug, and NEVER got a call from anyone else reporting it (PS/2s were going away already)
  • by aardwolf204 ( 630780 ) on Friday August 27, 2004 @03:31PM (#10091070)
    From the MSDN Blog [msdn.com]:

    Well, not directly, but they sure took the wind out of my sails with their new Picasa Photo Organizer and corresponding photo publisher Hello. I've been working on a photo editor/publisher application for personal use off and on for around 2 years. Lately, I've been think about how a lite weight, easy to use solution would be a big hit among new parents/grandparents like myself. Here they go giving it away for free. Who could do such a thing?

    You know what? I will not be daunted. I will rise up from my defeat and create a better application. That'll show 'em. One that publishes your photos to your blog, other users of your application, or via email. Wait, Hello already does that? How about cropping and reformatting your photos and organizing them into an album. What, Picasa has that covered?

    But, aha! I'll bet their solution doesn't use the power of Visual Basic.Net and the .Net Framework. With .Net behind me, nothing can stop me! And, maybe I'll publish my source. More on this later...

    Emphasis mine. having never read the MSDN blog before and seeing this now, all I can say is "OMFG"...
  • by ebyrob ( 165903 ) on Friday August 27, 2004 @03:36PM (#10091121)
    ...is less an example of a failed process than it is a testament to the difficulties of debugging feature-rich software on a timetable that meets marketing demands...

    Um, except the part where a developer and a tester go round and round about differences between "debug mode" and "release mode" problems. I mean come on, what kind of amatuer windows developer doesn't recognize the gigantic differences between debug and release mode apps on win32??!! If these guys would just learn to use printf() and/or the OutputDebugString() function they might be able to "see" a bit better.

    Oh yeah, and the part where they know "max file size" is an issue, but don't stop to figure out what the OS max file limit is before going on... sheesh. It'd be one thing if this bug's lifetime were a few weeks, but years??!!
  • Re:Thanks MBU! (Score:2, Interesting)

    by Rick Genter ( 315800 ) <.rick.genter. .at. .gmail.com.> on Friday August 27, 2004 @03:49PM (#10091214) Homepage Journal
    Actually, if you read Steve McConnell's Code Complete, a lot of it is about the Macintosh port of Excel, and the coding techniques used on that project. It made for good reading; every programmer should read that book at least one during their career, preferably toward the beginning of their career...
  • Boo Hoo (Score:3, Interesting)

    by andy_geek ( 522404 ) on Friday August 27, 2004 @03:51PM (#10091234) Homepage
    I see this as a pity play by M$, wanting users to just chill about bugs because they're so damned hard to fix. Well, excuse me, but last time I checked Microsoft wasn't giving Office software away for free, and if someone is going to shell out beaucoup bucks for something they have a right to demand it works as advertised.

    Cry me a river, Microsoft. I'll save my pity and empathy for people who do community or open source development.

  • by ttys00 ( 235472 ) on Friday August 27, 2004 @04:13PM (#10091382)
    In 2001, my girlfriend was forced to do her honours thesis in Word. It was around 120 pages, split into two files. She had to split it at page 99, because if she opened the thesis with more than 99 pages in Word, it fell over, thankfully without corrupting the file but still losing the work done since her last backup (made at 98 pages fortunately) as she was unable to open the "99 page + new work" file :( This was 100% repeatable on four different Windows machines that I tried it on. Even crashed a Mac she tried it on.

    It was at this point she switched to Mandrake + Openoffice and hasn't looked back since.
  • Re:But... (Score:3, Interesting)

    by Reziac ( 43301 ) on Friday August 27, 2004 @04:19PM (#10091442) Homepage Journal
    Funny but true story:

    I had Winword6 and WordPerfect 6.1 installed on the same machine, along with ~350 fonts. As a rule they handled one another's documents well enough, including fonts. One day I used WP's allfonts macro to create a document that sampled all 350 installed fonts. This printed fine in WP. However in Word -- after the first 20 or so fonts, it changed all the rest of the fonts to Wharmby. (This behaviour was reproducible, even with different fontsets, tho why it always picked on Wharmby is beyond me.)

    BTW, Word6's HTML (via a free plugin from M$) was primitive but clean enough; I often used it to strip out unwanted code from HTML exported by other apps, because it would kill anything it didn't understand. However, WordXP's "HTML" is in fact a very ugly and bloated subspecies of XML.

  • Re:Error message (Score:3, Interesting)

    by BlacKat ( 114545 ) on Friday August 27, 2004 @04:28PM (#10091514)
    The funny thing is these stupid error messages exist all over the place in MS software.

    Once, when writing a DX app I kept getting a "File Not Found" error trying to load a bitmap... it drove me crazy as the file WAS there and could be loaded.

    Finally, after trying everything I loaded the image into Photoshop and re-saved it, and boom, it suddenly worked.

    It seems that the header of the graphic had a small glitch in it, and instead of giving me a meaningful error (like Corrupt File) it decided to give me the "File Not Found" error. Sigh.
  • by Piquan ( 49943 ) on Friday August 27, 2004 @05:31PM (#10092000)

    Philosophical? Is that a euphemism for "useless"? I mean, what else can it mean? Simpler software that does the job is better than more complex software that does the same job. It's as simple as that. Nothing philosophical about it.

    Simple: dir

    Complex: Windows Explorer, which:

    1. Decides whether it should use a custom handler or the default handler to show the folder, based on the content (including whether a special file exists, and/or whether it's all pictures)
    2. For each file, looks into the registry to determine the correct CLSID, and uses that to
    3. determine whether the file should be shown,
    4. whether the extension should be shown,
    5. whether to use a default icon handler which:
      1. examines the CLSID,
      2. opens the .exe containing the icon,
      3. locates and parses out the resource section,
      4. draws the appropriate icon
      or to use a custom icon handler, which may do something completely different...

    Need I go on?

    We geeks like dir (actually, we prefer ls). The people who are buying software with great big corporate licenses like Explorer.

  • by Anonymous Coward on Friday August 27, 2004 @11:11PM (#10094008)
    But I LIKE WYSIWYG (or psuedo-WYSIWYG as the case may be for Office/Word)!

    I just don't understand why you should need to work on word-processing docs without being able to see the result of changes in real-time? Everything we do is moving towards real-time visualisation of computer work, from databases to computer modelling.

    It seems damn primitive to not be able to see the overall effect with each change. Why can't LaTeX be fully WYSIWYG? That would make me drop Microsoft Office in a heartbeat :)
  • Re:Thanks MBU! (Score:3, Interesting)

    by _|()|\| ( 159991 ) on Saturday August 28, 2004 @09:38AM (#10095679)
    I found it interesting that the Mac and Windows version of Word have forked, again. They merged for Word 6.0, but forked for Word 98. That seems like an admission of failure.

    Everyone talks about how complex Windows and Office are (millions of LOC), but I have to believe that some of it is unnecessary. If I was sitting on a few billion dollars, I think I would spend some of it on refactoring.

"May your future be limited only by your dreams." -- Christa McAuliffe

Working...