the definition of deus ex machina below is good but I thought I would add to it a little.
the phrase was originally used in plays when a god intervened to end the story but has since been expanded upon to include any improbable ending to a story essentially put in place to end the story the way the author wanted it ended despite it making no sense.
Ex. the bad guy is killed by a ninja who isn't introduced till the last chapter and the book is about the mafia
origin of the term: plays in ancient greece, when a story was ended by lowering a model of zeus onto the stage(with a machine) to tell everybody what happened. therefore, 'god from machine'. has become synonymous with 'weak ending'.
fingerpointer200, do you even know what web 2.0 is? No one does. It doesn't mean anything. You might want to know that.
deus ex machina (plural dei ex machina or dii ex machina or di ex machina or dei ex machinis or dii ex machinis or di ex machinis)
1. Any resolution to a story that does not pay due regard to the story's internal logic and that is so unlikely that it challenges suspension of disbelief, and presumably allows the author, director, or developer to end the story in the way that he or she desired (Ex. the protagonist waking up, realizing it was all a dream. 2nd Ex. another hero coming in out of an unexpected place to save someone at the last second).
" Oh, now I'm backed into a corner, and can't devise a way out. I could sure use a deus ex machina right about now!"