Why don’t you ever see a rat vomiting?

Date:June 1, 2005 / year-entry #136
Tags:non-computer
Orig Link:https://blogs.msdn.microsoft.com/oldnewthing/20050601-26/?p=35473
Comments:    10
Summary:Okay, maybe you never wondered why you never saw a vomiting rat, but the intrepid researchers at the Annals of Improbable Research have discovered that there's a good reason, and Anne's rat page will explain in more detail than you probably wanted.

Okay, maybe you never wondered why you never saw a vomiting rat, but the intrepid researchers at the Annals of Improbable Research have discovered that there's a good reason, and Anne's rat page will explain in more detail than you probably wanted.


Comments (10)
  1. muro says:

    Now this is one thing I never needed to know. Or as (I think) Sherlock Holmes put it:

    Interesting…now I hope I will forget soon. So my brain can remember important things.

  2. alex says:

    Oh, I feel like vomiting :)

  3. Dave says:

    "Why don’t you ever see a rat vomiting?"

    Maybe because I don’t want to see a rat at all, much less a rat vomiting?

    I saw a chicken play the piano once though.

  4. D. Philippe says:

    Now there’s two new words I hope I will never need to use in my vocabulary:

    <a href="http://www.answers.com/pica&r=67">pica</a&gt;: An abnormal craving or appetite for nonfood substances, such as dirt, paint, or clay.

    <a href="http://www.answers.com/emetic&r=67">emetic</a&gt;: Causing vomiting.

  5. Josh Koppang says:

    Pica also shows up in pregnant women. A flyer that my wife got from her doctor listed reasons that she would need to come in to the doctor. Among them was: "Eating non-food substances such as bleach and charcoal."

  6. KIm says:

    Makes me wonder how they tested sea sick pills.

  7. Anonymous Coward says:

    I never saw a Microsoft employee vomiting. Maybe we’re onto something.

  8. Asd says:

    Aha. So that’s why when they’ve eaten poison and are staggering round they don’t try to vomit it up.

  9. Anonymous Coward II says:

    "I’ve seen Microsoft libraries vomit though."

    "Not vomit, throw."

    "Oh yeah. By the way, if the owner of this blog sees the way your code abuses exceptions, "

    "Shut up."

  10. carlso says:

    From the article: "One of the main functions of vomiting is to purge the body of toxic substances. Rats can’t vomit, but they do have other strategies to defend themselves against toxins… When rats discover a new food, they taste a little of it, and if it makes them sick they scrupulously avoid that food…"

    In other words, the human digestive system is exception-based whereas a rat’s system uses error return codes.

    Human:

    try

    {

    while (!Full())

    {

    // Caution: human can throw up exceptions here

    EatFoodBite();

    }

    }

    catch (…)

    {

    RunToBathroom();

    }

    Rat:

    bool fGoodFood = true;

    while (fGoodFood && !Full())

    {

    fGoodFood = EatFoodBite();

    }

    or, for your highly-optimized rat:

    while (!Full() && EatFoodBite())

    ;

    Next time, we’ll examine how the introduction of additional mouths and stomachs to a rat can dramatically increase throughput, and what changes are needed to our food dispatching loop to accommodate them. ;-)

Comments are closed.


*DISCLAIMER: I DO NOT OWN THIS CONTENT. If you are the owner and would like it removed, please contact me. The content herein is an archived reproduction of entries from Raymond Chen's "Old New Thing" Blog (most recent link is here). It may have slight formatting modifications for consistency and to improve readability.

WHY DID I DUPLICATE THIS CONTENT HERE? Let me first say this site has never had anything to sell and has never shown ads of any kind. I have nothing monetarily to gain by duplicating content here. Because I had made my own local copy of this content throughout the years, for ease of using tools like grep, I decided to put it online after I discovered some of the original content previously and publicly available, had disappeared approximately early to mid 2019. At the same time, I present the content in an easily accessible theme-agnostic way.

The information provided by Raymond's blog is, for all practical purposes, more authoritative on Windows Development than Microsoft's own MSDN documentation and should be considered supplemental reading to that documentation. The wealth of missing details provided by this blog that Microsoft could not or did not document about Windows over the years is vital enough, many would agree an online "backup" of these details is a necessary endeavor. Specifics include:

<-- Back to Old New Thing Archive Index