Books have sexes; or to be more precise, books have genders. They do in my head, anyway. Or at least, the ones that I write do. And these are genders that have something, but not everything, to do with the gender of the main character of the story.



When I wrote the ten volumes of Sandman, I tended to alternate between what I thought of as male storylines, such as the first story, collected under the title Preludes and Nocturnes, or the fourth book, Season of Mists; and more female stories, like Game of You, or Brief Lives.



The novels are a slightly different matter. Neverwhere is a Boy's Own Adventure (Narnia on the Northern Line, as someone once described it), with an everyman hero, and the women in it tended to occupy equally stock roles, such as the Dreadful Fiancee, the Princess in Peril, the Kick-Ass Female Warrior, the Seductive Vamp. Each role is, I hope, taken and twisted 45% from skew, but they are stock characters nonetheless.



Stardust, on the other hand, is a girl's book, even though it also has an everyman hero, young Tristran Thorne, not to mention seven Lords bent on assassinating each other. That may partly be because once Yvaine came on stage, she rapidly became the most interesting thing there, and it may also be because the relationships between the women - the Witch Queen, Yvaine, Victoria Forester, the Lady Una and even Ditchwater Sal, were so much more complex and shaded than the relationships (what there was of them) between the boys.



The Day I Swapped My Dad For Two Goldfish is a boy's book. Coraline (which will be released in May 2002) is a girl's book.



The first thing I knew when I started American Gods - even before I started it - was that I was finished with C.S. Lewis's dictum that to write about how odd things affect odd people was an oddity too much, and that Gulliver's Travels worked because Gulliver was normal, just as Alice in Wonderland would not have worked if Alice had been an extraordinary girl (which, now I come to think of it, is an odd thing to say, because if there's one strange character in literature, it's Alice). In Sandman I'd enjoyed writing about people who belonged in places on the other side of the looking glass, from the Dreamlord himself to such skewed luminaries as the Emperor of the United States.



Not, I should say, that I had much say in what American Gods was going to be. It had its own opinions.



Novels accrete.



American Gods began long before I knew I was going to be writing a novel called American Gods. It began in May 1997, with an idea that I couldn't get out of my head. I'd find myself thinking about it at night in bed before I'd go to sleep, as if I were watching a movie clip in my head. Each night I'd see another couple of minutes of the story.



In June 1997, I wrote the following on my battered Atari palmtop:



A guy winds up as a bodyguard for a magician. The magician is an over-the-top type. He offers the guy the job meeting him on a plane - sitting next to him.



Chain of events to get there involving missed flights, cancellations, unexpected bounce up to first class, and the guy sitting next to him introduces himself and offers him a job.



His life has just fallen apart anyway. He says yes.



Which is pretty much the beginning of the book. And all I knew at the time was it was the beginning of something . I hadn't a clue what kind of something. Movie? TV series? Short story?



I don't know any creators of fictions who start writing with nothing but a blank page. (They may exist. I just haven't met any.) Mostly you have something . An image, or a character. And mostly you also have either a beginning, a middle or an end. Middles are good to have, because by the time you reach the middle you have a pretty good head of steam up; and ends are great. If you know how it ends, you can just start somewhere, aim, and begin to write (and, if you're lucky, it may even end where you were hoping to go).



There may be writers who have beginnings, middles and ends before they sit down to write. I am rarely of their number.



So there I was, four years ago, with only a beginning. And you need more than a beginning if you're going to start a book. If all you have is a beginning, then once you've written that beginning, you have nowhere to go.



A year later, I had a story in my head about these people. I tried writing it: the character I'd thought of as a magician (although, I had already decided, he wasn't a magician at all) now seemed to be called Wednesday. I wasn't sure what the other guy's name was, the bodyguard, so I called him Ryder, but that wasn't quite right. I had a short story in mind about those two and some murders that occur in a small Midwestern town called Silverside. I wrote a page and gave up, mainly because they really didn't seem to come the town together.



There was a dream I woke up from, somewhere back then, sweating and confused, about a dead wife. It seemed to belong to the story, and I filed it away.



Some months later, in September 1998, I tried writing that story again, as a first person narrative, sending the guy I'd called Ryder (who I tried calling Ben Kobold this time, but that sent out quite the wrong set of signals) to the town (which I'd called Shelby, because Silverside seemed too exotic) on his own. I covered about ten pages, and then stopped. I still wasn't comfortable with it.



By that point, I was coming to the conclusion that the story I wanted to tell in that particular little lakeside town ... hmm, I thought somewhere in there, Lakeside, that's what it's called, a solid, generic name for a town ... was too much a part of the novel to be written in isolation from it. And I had a novel by then. I'd had it for several months.



Back in July 1998 I had gone to Iceland, on the way to Norway and Finland. It may have been the distance from America, or it may have been the lack of sleep involved in a trip to the land of the midnight sun, but suddenly, somewhere in Reykjavik the novel came into focus. Not the story of it - I still had nothing more than the meeting on the plane and a fragment of plot in a town by a lake - but for the first time I knew what it was about. I had a direction. I wrote a letter to my publisher telling them that my next book wouldn't be a historical fantasy set in restoration London after all, but a contemporary American phantasmagoria. Tentatively, I suggested American Gods as a working title for it.



I kept naming my protagonist: There's a magic to names, after all. I knew his name was descriptive. I tried calling him Lazy, but he didn't seem to like that, and I called him Jack and he didn't like that any better. I took to trying every name I ran into on him for size, and he looked back at me from somewhere in my head unimpressed every time. It was like trying to name Rumpelstiltskin.



He finally got his name from an Elvis Costello song (it's on Bespoke Songs, Lost Dogs, Detours and Rendezvous). It's performed by Was (Not Was) and is the story of two men named Shadow and Jimmy. I thought about it, tried it on for size...



...and Shadow stretched uncomfortably on his prison cot, and glanced across at the Wild Birds of North America wall calendar, with the days he'd been inside crossed off and he counted the days until he got out.



And once I had a name, I was ready to begin.



I wrote Chapter One around December 1998. I was still trying to write it in the first person, and it wasn't comfortable with that. Shadow was too damn private a person, and he didn't let much out, which is hard enough in a third-person narrative and really hard in a first person-narrative. I began chapter two in June 1999, on the train home from the San Diego comics convention (it's a three day train journey. You can get a lot of writing done there.)



The book had begun. I wasn't sure what I was going to call it, but then the publishers started sending me mock-ups of the book's cover, and it said American Gods in big letters in the top, and I realised that my working title had become the title.



I kept writing, fascinated. I felt, on the good days, more like the first reader than the writer, something I'd rarely felt since Sandman days. Neither Shadow nor Wednesday were, in any way, everyman figures. They were uniquely themselves, sometimes infuriatingly so. Odd people, perfectly suited for the odd events they would be encountering.



The book had a gender now, and it was most definitely male.



I wonder now, looking back, if the short stories in American Gods were a reaction to that. There are maybe half a dozen of them scattered through the book, and all (but one) of them are most definitely female in my head (even the one about the Omani trinket salesman and the taxi driver). That may have been it. I don't know. I do know that there were things about America and about its history that it seemed easier to say by showing rather than telling; so we follow several people to America, from a Siberian Shaman 16,000 years ago, to a Georgian pickpocket two hundred years ago, and, from each of them, we learn things.



And after the short stories were done, I was still writing. And writing. And continuing to write. The book turned out to be twice as long as I had expected. The plot I thought I was writing twisted and snaked and I slowly realised it wasn't the plot at all. I wrote the book and wrote the book, putting one word after another, until there were close to 200,000 of them.



And one day I looked up, and it was January 2001, and I was sitting in an ancient and empty house in Ireland with a peat fire making no impression at all on the stark cold of the room. I saved the document on the computer, and I realised I'd finished writing a book.



I wondered what I'd learned, and found myself remembering something Gene Wolfe had told me, six months earlier. "You never learn how to write a novel," he said. "You just learn how to write the novel that you're writing."



