Discussion at last night's party about movies led to my attempt at a classification of the widespread phenomenon of Movies With Surprise Endings That Don't Work owing to Inadequate or Malevolent Screenwriting:
1. Movies where the surprise ending comes out of left field and doesn't fit with anything that's been established earlier. Examples: The Empire Strikes Back, The Usual Suspects.
2. Movies where the writers deliberately mishandled the script to hide that in this story the surprise ending was not possible. Example: The Sixth Sense.
3. Movies where the surprise ending depends on the manipulating characters having impossibly certain knowledge of exactly what other characters will do so as to fall into their plan. Example: Arlington Road. Also, season 2 of Orphan Black.
4. Movies where the surprise ending is just too stupid to be believed. Example: The Village. (About which Ebert famously wrote: "It's so witless, in fact, that when we do discover the secret, we want to rewind the film so we don't know the secret anymore. And then keep on rewinding, and rewinding, until we're back at the beginning, and can get up from our seats and walk backward out of the theater and go down the up escalator and watch the money spring from the cash register into our pockets.")