Photo: Getty Images

I spend a lot of time thinking about a Raymond Chandler quote I once read. “The perfect detective story cannot be written,” he said. “The type of mind which can evolve the perfect problem is not the type of mind that can produce the artistic job of writing.”

Well — shoot. It has the ring of truth to it, unfortunately. Almost every writer seems to start out interested either in narrative or talking, story or language, before filling in the rest later. This is why it’s funny when literary novelists who couldn’t write a competent John Wick novelization (I put this challenge squarely to A.S. Byatt) call J.K. Rowling a bad writer. She’s an indifferent stylist, sure, but in most of the other ways a writer can be “good” — character, plot, imagination — she’s brilliant. Past brilliant. Meanwhile Chandler, whom many of the same people (rightly) revere, could never, as he freely admitted, explain who killed the chauffeur in The Big Sleep.

The contemporary novelist who comes closest to real parity between story and art may be Tana French. Her most striking gift is for voice, but if her plots aren’t flawless, you can see nonetheless how hard she works to make them very, very good, with just an occasional faint seam showing, nothing more. But that’s almost certainly a product of tenacity and intelligence, not instinct. I would bet French has spent more time thinking about structure than Agatha Christie — who hatched her perfect plots in the bathtub, serenely eating apples — ever did.

I say all this as someone who’s written 12 mystery novels now, besides one unrelated literary novel. I don’t know what type of mind I have (I put this challenge squarely to A.S. Byatt, too), but it’s not the kind that can evolve the perfect problem. When people at parties very kindly ask which of my books they should read, my second answer, after “none of them,” which I mean with all my heart, because writing books is a gruesomely embarrassing thing to do, is that they should read not the first but the 11th: The Woman in the Water, a prequel to the others in the series. The reason for this is that, while I don’t know if readers can tell this, it took me two or three books to learn how to become passable at constructing a mystery novel, and six or seven until I really hit a stride. Before that, I rode my strengths, such as they are: atmosphere, humor, and possibly, if I’m feeling generous toward myself, a certain inquisitive lyricism. As for plot, I wrote 240 pages of my first book before I figured out who the murderer was. I really truly sincerely don’t recommend that, method-wise.

Precisely because plot isn’t natural me, I’ve had to develop a painstaking system for fabricating my mysteries, to spare myself the awful nauseated feeling of story confusion that nearly all my friends who are novelists know well, and absolutely dread.

So here it is.

I start by writing a brief, extremely dull short story. No one will ever see one of these if I can conceivably prevent it; it’s usually only about three pages, but I refine it for weeks, as carefully as Rudy Giuliani mixing his old fashioned before he Skypes in to Hannity, because, like Rudy, I’m focused on doing a crime. Specifically, that small story contains a full, straightforward account of the case my detective must solve, told in simple English. It enumerates who committed the crime and why, how they covered it up, and all the stuff of mystery novels: clues, red herrings, false leads, bloody knives, mysterious scars, anonymous notes, midnight rendezvous — in short, all the details I know I’ll have to omit from the real book I write, the actual mystery novel.

Then, as I’m writing, I sift these details into the text one by one. (In his ten commandments for writing detective novels, Ronald Knox famously insisted that the detective and reader have all the same clues. He also said you get no more than one secret passageway or chamber per book. So use it wisely.) Which is not to say that I know exactly how the story will turn out. I wish I had that kind of control over my material — P.D. James used to write such detailed outlines that she could sit down each morning and write whatever chapter she felt like from the book, supposedly — but inevitably things turn out differently than I expect. Still, the lineaments of the puzzle remain intact, visible to me in that uninteresting little story.

That’s it. There are a million other pieces of advice I could give; for instance, it’s crucial to know before you set out whether you want to write a mystery (in which, generally, a detective solves a crime) or a thriller (in which the lead character’s life is turned upside down by a crime), or the kind of tricky mix of the two that Lee Child pulls off so tidily once each year. Or another: If you’re good at the puzzle bit but doubtful about your creativity, you can be as schematic as James Joyce, notable author of white-hot beach reads, and try to sketch out your characters and scenes in terms of their colors, scents, dominant emotional tones, and so on. But for me, at any rate, the small hidden story I write is the only indispensable part of the process.

This probably sounds like an artificial way to go about writing a book. But it isn’t, or at least, it doesn’t feel that way when I’m inside of doing it. The first impulse of each mystery I write is some crime — or occasionally some enigmatic and ominous image — that gets a grip on me. (A good test I use for these is whether I’d listen to a whole season of Serial about whatever I just made up. If not, I scrap it immediately.)

But writers often falter when they simply ride that feeling without trying to shape it, which is why Gone Girl is better than nearly every novel that’s been published since it came out. I’m not a complete inspiration skeptic — once in a while, as Hemingway said, you get lucky and write better than you know how to write — but it’s a rare novel that can survive on it exclusively. Sometimes I wish the innumerable literary writers like Louise Erdrich and Cormac McCarthy and Jonathan Lethem, who, however they’re classed, are ultimately authors of varyingly proficient mystery novels, would sit down and let Attica Locke give them a 30-minute lecture on craft. It’s here — less than in the division of readerships — that perhaps any kind of fashionable scorn for genre fiction most diminishes our literary culture.

There’s no evidence that Michelangelo gave his famous advice about how to sculpt: “Remove everything that isn’t David.” Too bad, though. It’s such a good line that it deserves to be real, just as Leonard Woolf said the soul ought to be immortal. It captures two difficult artistic truths in only five words: first, that real beauty often lies in the elimination of superfluities, as every good writer knows by instinct or learns by painful course correction, and second, that you can’t actually tell anyone how to make art. Only a single person ever looked at a block of marble and knew which parts of it weren’t the David.

Still, you can teach someone how to hold the chisel. In the case of the mystery, one of the hardest forms to master in my opinion, you can go a step or two farther even. There’s some irony (I think? Alanis?) in the fact that I often offer the advice I’ve given here in terms of Michelangelo’s coolly contemptuous dictum﻿: One way to write a good mystery is to put back everything that isn’t the David, after you’ve excavated him. Then let the reader start chipping.