Desperately seeking a ratings hit

Desperate Housewives, the number one TV show in America, is set to be the most talked about TV series since Sex and the City. Yet its journey from script to screen was not without drama, as its British director explains

The first must-see drama series of 2005, Desperate Housewives, begins on Channel 4 tonight. A black comedy that is part Twin Peaks, part Sex and the City, it follows the lives of a group of women living seemingly perfect lives in Wisteria Lane, a sleepy, sun-drenched street in suburban California, with white picket fences, manicured lawns – and myriad dark secrets.

The characters are set to be as memorable as Carrie Bradshaw and friends: Susan Mayer (Teri Hatcher) is a single mother, struggling to reignite her love life; Lynette Scavo (Felicity Huffman), is a former high-flier who has given up her career for her four impossibly demanding children; then there's Bree Van De Kamp (Marcia Cross), a domestic goddess whose family can't take any more; Gabrielle Solis (Eva Longoria), a trophy wife with the hots for her gardener; and Edie Britt (Nicolette Sheridan), the serial divorcée and neighbourhood tramp.

In America, the show has attracted critical acclaim and audiences of 22 million, while offending family values groups and attracting complaints from viewers and advertisers. Yet its journey to the screen was far from smooth, with walkouts, reshoots, recasting and studio interference. The show's British director, Charles McDougall, kept a diary during production; in it, he explains how he survived a year of living desperately.

January 2004: It is pilot season, and I am sitting in Art's Deli on Ventura Boulevard, Hollywood, with a group of desperate producers. The director of their new show, Desperate Housewives, has just walked – apparently, after being told that casting would be a group decision rather than solely the responsibility of the director.

That's not all he could have resigned over. Whereas in the UK, television production is still largely a triangular effort between writer, producer and director, all working with a commissioning editor, in the US there may be a dozen writers, more credited producers, a studio – in this case, Touchstone – and a network, each with its own layers of executives and presidents and each with one foot in a revolving door.

Being obliged to negotiate a path through such numbers on every major decision is one reason why US network television is so anodyne.

Another is the generic subject matter. Invariably, if a script does not inhabit a hospital, courtroom or police precinct, it has little chance of getting on air. Desperate Housewives is something else entirely. Set in that most overlooked of locations, the American suburbs, it aims to strip the veneer of respectability and have fun with a combination of soap opera, mystery and some laughs.

The script has had an unusual genesis. Each season, hundreds of pilot scripts are commissioned and approximately 60 made. Of these, maybe a quarter make it on air and, of these, almost none makes it through a first season.

Desperate Housewives is different: a "spec" (ie uncommissioned) script, written by Marc Cherry – who admits that his career had been down the pan before DH. This is his first script that is not a sitcom, and in freeing himself to write of his experience in the suburbs of Orange County, he has crafted an elegant introduction to the lives of four women and their dead friend.

Elegant it may be, but that didn't stop it being turned down by several networks – CBS, NBC, Fox, HBO, Showtime and Lifetime. Only ABC, its own drama output down the pan, has little to lose. Tonally, the show is tricky. Too broad and it will become a self-parody; too serious, and it will be stillborn. But for American TV, it is fresh, and fresh being good, and with the proviso of rewrites, I am in.

February: Unlike Sex and the City, where I began work on the show after the principals had been cast, the pilot of DH starts with no actors and a huge talent pool of actresses fed up with playing love interests or best friends. We see 150 very good and determined women, all recognising the script for what it is – a rare opportunity to play a character with some (to use industry jargon) relatability.

Eva Longoria is in early, knocking her two auditions out of the park and telling us she has five offers. Teri Hatcher bribes us with her motherliness and homemade cookies; Felicity Huffman storms in, vowing to kill her kids on her return home; and Marcia Cross dithers over whether she can see a way to playing a Martha Stewart-like figure. Nicolette Sheridan's breasts enter the room and, a short while later, she follows to claim the role of neighbourhood slut.

Only the busybody next-door neighbour causes difficulty. ABC urges us to cast an Asian American woman, to balance the cast. We see the best 30 and fail to raise a glimmer or a laugh, so I suggest we give the part to the woman whom Marc wrote it for, who is not very Asian.

Having agreed among ourselves, we then have to take our choices for each character first to the studio and then the network, where, once again, the actors have to do their tap dance in front of an increasingly large and unresponsive audience.

As a means of choosing the best, the system has failings, as at each step the actors' performances visibly deteriorate while the stakes rise. Finally, we agree to disagree on a couple of parts.

March: One of the lunacies of pilot season is that, with 60 dramas being made at once, such positions as designers, directors of photography and actors experience "pilot inflation". The good ones can field several offers and play studios off against one another.

Stage and backlot space also becomes at a premium, and we have a location-dependent show in Desperate Housewives, almost all of which takes place on one street. We look at every suburb within 30 miles of LA, before realising that even if we can keep a neighbourhood sweet for 13 days of shooting for a pilot, including eight all-nighters, it would be impossible to go back for a series.

Finally, we settle on a bizarre street on the Universal backlot, a forgotten cul-de-sac on the tram tour, where old movie houses are brought to die. Thus, the Desperate Housewives now live in homes formerly occupied by James Stewart and his invisible rabbit friend, the Munsters and the cast of Leave It to Beaver.

Seven hundred thousand dollars of refurbishment later, including lawn mowers, bicycles and food mixers straight out of the Sears catalogue, as well as an inordinate amount of silk wisteria at 10 bucks a stem, Wisteria Lane is ready to roll.

The shoot moves smoothly and surprisingly enjoyably. After cruising round suburbs at the weekend for inspiration, I realise that the only details of real life that are missing from the backlot seem to be squirrels and crows, so each day begins with a petulant cry, "Where are the squirrels?" (On the last day of the shoot, producer Michael Edelstein turns up on set in a six-foot squirrel costume.)

And the women? The women are to the manner born, at once a cohesive group and yet firmly individual. If nothing else, we cast the leads correctly.

April: Cutting follows the same routine as casting. The editor, Michael, who came with me from Sex and the City, cuts. Then, the producers arrive and, next, the studio representatives, who leave well alone until after a test screening.

The process is fascinating: 124 people, half male, half female, are paid to come to a facility in Burbank, where they watch the show with a special dial in their hand which monitors any moments of boredom, any peaks of tension, and all laughs; these are converted into graphs which are superimposed, in real time, on to our monitors as the show runs.

We can watch the audience through a two-way mirror and can see at exactly which moment the men's graph peaks above that of the women. Depressingly, it happens only once, when Eva takes her shirt off.

May: In mid May, each network announces, with much hyperbole, which shows have been picked up for the new season. ABC has picked up Desperate Housewives. The producers announce that we need to recast.

June: Three characters are recast, including that of Mary Alice, who is the narrator. After days in an audio studio, it becomes clear how difficult it is to find and maintain the tone of the voice running through each episode.

The young gardener is recast to add some male sex appeal, and one husband is recast to include the actor we had been chasing since his first audition. And what are we left with? A mainstream show, trading on sex and violence, but without an ounce of nudity or edginess.

October: After a smart campaign by ABC, the pilot opens higher than any debut since ER. Week by week, it grows, until it becomes the number one show in the country. Ad rates treble to $400,000 per 30 seconds, and the show's demographic is the most prized – 18-44-year-olds – not just in the coastal cities, but in Bush's red states. For a nation on a moral crusade, it is a modest lapse.