Slashdot Mirror


Anatomy Of A Bug In Microsoft Office

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."

15 of 642 comments (clear)

  1. Debugged humans eh? by Rosco+P.+Coltrane · · Score: 4, Interesting

    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.

    --
    "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
  2. The key problem is expressed in very few words by newandyh-r · · Score: 5, Interesting

    "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."

  3. Complexity theory and chaos by tao_of_biology · · Score: 3, Interesting
    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 and CHAOS.

    --

    -- "A chicken is an egg's way of making another egg."

    1. Re:Complexity theory and chaos by fireboy1919 · · Score: 4, Interesting

      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.

      --
      Mod me down and I will become more powerful than you can possibly imagine!
  4. Must reproduce in order to fix? by Akiba · · Score: 3, Interesting

    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

  5. Re:Amazing innovation... by fatmonkeyboy · · Score: 4, Interesting

    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.

  6. A simple case of the wrong error.. by wfberg · · Score: 4, Interesting

    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".

    --
    SCO employee? Check out the bounty
  7. Comment removed by account_deleted · · Score: 4, Interesting

    Comment removed based on user account deletion

  8. Re:Amazing innovation... by Anonymous Coward · · Score: 3, Interesting

    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.

  9. It's actually worse than that - auto-save does it! by alispguru · · Score: 3, Interesting

    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!

    --

    To a Lisp hacker, XML is S-expressions in drag.
  10. Re:But... by mandos · · Score: 5, Interesting

    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.

    --
    Mike Scanlon
  11. Re:Bug Triage by TedCheshireAcad · · Score: 4, Interesting

    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.

  12. Re:Just a thought by CharlieG · · Score: 3, Interesting

    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)

    --
    -- 73 de KG2V For the Children - RKBA! "You are what you do when it counts" - the Masso
  13. Boo Hoo by andy_geek · · Score: 3, Interesting

    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.

    --
    "Don't matter how New Age you get, old age is gonna kick your ass." - Utah Phillips
  14. Re:Error message by BlacKat · · Score: 3, Interesting

    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.