When ''Desperate Housewives'' creator Marc Cherry pitched his show to ABC a few years back, there weren't any gay characters in it. But Cherry had always planned to have teenage sociopath Andrew Van De Kamp be gay and waited until the show was a ratings smash to avoid any sponsor defections and controversy.
''Ratings are a really nice thing,'' Cherry said this week. ''I revealed he was a sociopath first, then I revealed he was gay. (Andrew) is perhaps the most empowered gay teen in the history of television. He's gay and he doesn't care.''
Cherry was among the openly gay and lesbian television writers who participated in a Writers Guild of America panel Tuesday night, sharing their mixed experiences in Hollywood trying to create gay characters for their shows.
Jack Kenny, creator of NBC's short-lived ''The Book of Daniel,'' said his controversial show, which also included a young gay male character, was yanked off the air after just four episodes (six were shot in all) after being relegated to a Friday night time slot where it suffered low ratings.
While ''Daniel'' drew fire from Christian conservatives more because it featured a pill-popping Episcopal priest (Aidan Quinn) who has regular conversations with an on-screen Jesus, Kenny complained that in attacking the show, opponents made an issue of his sexuality.
''If it was a straight guy writing about Jesus, they would have had less ammo,'' said Kenny. ''Sometimes controversy helps, but in this case, it didn't help.''
Some NBC affiliates yanked the show before NBC officially pulled the plug or never aired it at all. The network attributed the early cancellation to the ratings and not the controversy, which also included nearly all major advertisers bailing out on the show and a national boycott from the American Family Association.
Chuck Ranberg, who was a writer and producer on ''Frasier,'' had a far different experience when he launched the short-lived ABC comedy ''It's All Relative'' in 2003 featuring two gay dads who repeatedly clash with the boisterous parents of their daughter's fiance.
There were no boycotts, no lost advertisers but ultimately, there were no ratings.
''We could have used a little controversy,'' said Ranberg. ''We were really under the radar.''
Toni Graphia, a writer for the Sci-Fi Channel hit ''Battlestar Galactica,'' said that sometimes the resistance to gay and lesbian characters comes not just from the broadcast and cable networks or advertisers. When Graphia suggested a lesbian story line for the HBO series ''Carnivale,'' which chronicled the lives of a group of traveling circus performers in the 1930s, she said she was met with ''some homophobia in my own writers room.''
''It was like this big wall of resistance,'' she said. ''This actually got said to me: 'Back in the '30s, they didn't have lesbians.'''
All of the panelists are openly gay and opinions differed on what kind of impact that has on a career.
''I don't think we'll ever know,'' said Bob Lowry, creator of the Showtime series ''Huff.'' ''I'd like to think no because I'm out everywhere. I think it might matter though.''
James Duff, a director and writer of the TNT drama ''The Closer,'' said he believes acceptance of openly gay writers can change with the times, for good or bad.
''We're in a time where it's OK and what they are looking for is really good shows because television has become a very competitive place,'' Duff said. ''You have to be able to tell a story, and if you can do that, I think they don't care at all.''
But Chris Alberghini, executive producer of the upcoming Tori Spelling comedy ''So NoTORIous'' on VH1, had a different view. ''If you are gay, you can be typecast as a certain kind of writer,'' Alberghini said. ''They just don't think of you for a certain kind of project. I think it can make a big difference.''
For Graphia, participating in the WGA panel was the first time she had been out in such a public way. She received a prolonged ovation from the audience for taking that step Tuesday night and had only just begun to think about what impact it might have.
''I'm not out, so when they asked me, my first response was, how did you get my name?'' she said. ''My friends said, 'This is the year to be gay with 'Brokeback Mountain' and all. If you were ever going to do it, now is the time.' If you invite me back next year, I'll be able to tell you if I was discriminated against.''