The New Yorker has a terrific article by D.T. Max about screenwriter Tony Gilroy, whose films range from Dolores Claiborne to The Bourne Identity to Michael Clayton (a personal favorite).

I particularly liked his discussion about the challenge of writing a thriller:

Gilroy believes that the writer and the moviegoing public are engaged in a cognitive arms race. As the audience grows savvier, the screenwriter has to invent new reversals—madder music and stronger wine. [...]

“How do you write a reversal that uses the audience’s expectations in a new way? You have to write to their accumulated knowledge.”

Definitely worth a read.