User blog comment:The Milkman/Indoctrination Theorists Say the Darndest Things/@comment-4941068-20121023181702/@comment-24174486-20121023183850

I have to disagree with your examples regarding deus ex machina. A major part of a deus ex machina is that a solution comes suddenly and in a contrived way.

For your example of what is a deus ex machina: the man has to get through the door himself in order for the homeowner to help him and it may not be unreasonable for the homeowner to have a gun or to shoot the muggers. It is not a zero-effort solution on the man's part. A better example would be a building suddenly collapsing upon the muggers, without any intervention from the characters.

For your example of what is not a deus ex machina: if the man was established as being a poor fighter, then having something like this happen would be a deus ex machina—he would have suddenly gained an ability solely for the purpose of overcoming an obstacle he would not have been able to overcome otherwise.