A blank page is frightening. Something has to be written, but how do you choose the words? Why this word and not that? How to overcome the arbitrariness of writing? One way is to trick yourself, to pretend that what you’re about to write has already been written, that someone has been there already and that you’re only following his traces, trying to reconstruct what must have happened. This is the idea of detective fiction: you begin with an unexplained corpse or an impossible theft; following the clues should tell you what happened, and then how and why. It’s a nice solution: the writer is the detective, presented with a small group of people he doesn’t know; he has to find out who they are, discover their histories and motives. By the time the story is over, he knows everything. At this point another book might begin.

If writers of detective fiction cast themselves as detectives, this isn’t how it seems to their readers, who prefer to think of them as criminals. The writer, thanks to his trickery, creates the illusion that he knew all along who did it. He chooses what information to disclose and when, ideally operating in such a way as to make the puzzle possible in theory for a reader to solve, though not in practice, so that by the end the reader feels hoodwinked but not cheated. This isn’t an easy thing to achieve, but leaving an audience happily hoodwinked is the only conceivable reward for the conman – apart from the money. The trouble is that audiences are rarely happy. Magicians know not to tell you how they did it: writers of detective fiction, on the other hand, have to finish with an ingenious explanation; once the solution has been presented to you, a puzzle ceases to have any point, and you can only begin another. Mystery writers have no choice but to become career criminals. The worst of it is that by leaving the clues that allow the detective to solve the mystery, they’re constantly hanging themselves. This isn’t normal criminal behaviour.

Everyone wants to be the detective: the criminal can’t win, and the detective is smarter. But in the purest detective stories, the most crossword-like, the writer can’t help being a bit of both. This is the puzzle-setter’s game: he has to be able to solve the problem as well as pose it; he has to follow the steps his followers might take, making sure they have just enough information to reach the solution and no more, unless it’s false information designed to lead them the wrong way. Puzzles have rules and conventions: setter and solver have to talk the same language. In these stories, there is usually a corpse; there are clues, alibis and suspects. Since the puzzle has to be soluble, the criminal must be someone known to the detective, not an outsider. Supernatural explanations are prohibited. All the suspects have to be present, so the setting must be circumscribed. Agatha Christie preferred small villages and house parties, but almost anything would do: an island, a plane, a train. G.K. Chesterton’s settings in his Father Brown stories are stranger and simpler: a beheading in a walled garden with no exits, the theft of all the silver of an elite dining club during a meal. He almost removes the need for motive: the perfect criminal commits the perfect crime for its beauty, for the perfection of the puzzle.

Classic English detective fiction suffered for its neatness. It was implausible, frustrating, dull. (Or even nightmarishly addictive, which is my problem even with Chesterton: a much more dangerous thing.) The person usually credited with finding a way out is Dashiell Hammett. Raymond Chandler, Hammett’s more sophisticated successor, made the claim most publicly in the Atlantic Monthly in 1944 in an essay that has come to be seen as his manifesto: ‘Hammett gave murder back to the kind of people that commit it for reasons, not just to provide a corpse; and with the means at hand, not with hand-wrought duelling pistols, curare and tropical fish. He took murder out of the Venetian vase and dropped it into the alley.’ Hammett’s detective-heroes, like Chandler’s, are private eyes, hired to investigate (usually) professional killings in the crooked ganglands of West Coast America. On their way to fingering the culprit, they are threatened, knocked out with blackjacks, tied up and beaten; but they come through in the end and find their man, or (often) woman. There are insurance scams, political murders, altered identities. The new hard-boiled detectives had nothing to do with the nice gentility of their sedentary English competitors.

The full text of this book review is only available to subscribers of the London Review of Books.