I learned about deus ex machina back when I was taking a classic mythology class in college. I picked up sometime thereafter its significance in writing today. (Frowned upon, for your information.) Then for years and years no one knew what I was talking about when I brought it up. How did you manage to bring that up, Gail, you may ask. When complaining about the endings of books or movies, of course.
One of the Gauthier boys finally learned about it sometime during his education. I nearly wept.
The Spectacle has a post called Deus Ex Machina and Foreshadowing: Advice for Writers that will explain the whole thing to you. Note that commenters use DEM for deus ex machina. I'm going to do that from now on, too.