Cheap trick. I read somewhere that good stories don't have surprises like that, no sudden unveiling of facts at the end to suddenly change the plot - dependent on narrator and point-of-view of course - nothing that should have been previously known 100 pages ago that the author just hid up his sleeve to hit you with at the last moment. You can't always apply that rule, of course, but it's worth thinking about. When I wrote loose crazy fantasy fiction-prose I'd just start with characters and see what they did. Several "novels" worth of that hidden away in old desks on lined paper in longhand. Now and then I experiment with prose outside of the blog but it's much more semi-autobiographical. I think, by the way, sometime I should try my hand at scripts. I watched the House of Yes again last night and I want to read the play it's based on, I think it's a very tight script. But the trick one of them employs is "I have a twin"
This is what pissed me off about Sherlock Holmes. I can't believe any of the Holmes stories are considered the standard of mystery literature. "Oh, by the way, Sherlock knew all along cause that one time he saw the thing and did the move to trap the guy. He's so smart heh." Come on.
What bothered me about Sherlock Holmes is the fact that Holmes' skill is essentially "looking very hard" and/or "noticing the details and putting them together." In addition, a lot of the stories rely on there being little tells for Holmes to pick up on - when in real life that isn't always the case - although I suppose the point was the tells were so small "ordinary" people wouldn't notice them. Idk.
Cut Conan Doyle a little slack, though - it was over a hundred years ago, there was no Internet, he had an opium habit to feed and he even tried to kill Sherlock Holmes off in a satisfying way and the fans dragged it back. You'd probably invent a snake every now and then, too.
It's called a deus ex machina and is to be avoided at all costs. The counterprinciple is Chekhov's gun.
Trey Parker uses it to varying degree when he digs himself into a giant hole in some South Park episodes. In the case of a 22 minute comedy, it can work in a beautifully ridiculous way, although even in those cases I think it's only used because the show is a made in a week and sometimes they just run out of time.
You can get away with a lot more in parody because absurdity is a fundamental part of satire. It's when you're taking yourself seriously - "if the eagles could swoop in and save Frodo and Samwise at the end, why didn't they just ride fuckin' eagles from the Shire in the first place?"