Brandon Tartikoff has the kind of vague, anonymous features kids draw as faces on the sun or the moon. He peers out from a hotel lobby telephone booth where, at 8:30 in the morning, he is already doing business. Soon he ambles into the Polo Lounge, at this hour a pink-and-green breakfast club for those who read Daily Variety and The Wall Street Journal. In that order. And very little else.

"You can tell how good your ratings are by where they seat you in here," says Tartikoff, boyish president of NBC Entertainment and at the moment the most celebrated, admired and envied programmer in all of television. Tartikoff has been at his job since 1980, and in executive programming positions since 1977, but this past TV season was the one that made mere prelude of the others. NBC pulled itself out of perennial third place and finished second for the first time in a decade, knocking the whole network balance of power for a loop.

With Grant A. Tinker as chairman and Tartikoff doing the programming, NBC has gone from scroungy also-ran to industry leader. It is now the hot network, the pacesetter, the trailblazer. Tartikoff, who was there through years of failure, through "Supertrain" and "Hello, Larry" and "Manimal," is there now to see it all come around, with "The Cosby Show," "Cheers," "Miami Vice," David Letterman and "Hill Street Blues."

For putting on shows like that, Brandon Tartikoff can claim the title of The Man Who Made It Cool to Watch Television Again -- important not just for NBC, but for network TV generally as it faces surging competition from cable and home video and a dwindling share of the viewing audience. Tartikoff is unflappably cool himself. He's just barely in color. If he were any cooler, he would dissolve into that illusory collection of phosphorescent lines that make up a TV picture. He would become television.

Tartikoff's accomplishment is not just in raising the Titanic of NBC's ratings, but in doing that with shows that are largely respectable, occasionally exceptional. In addition, he and Tinker established NBC as the network that has the least itchy trigger finger when it comes to canceling a promising new show, and also is more reasonable and amenable toward producers with new ideas. Says one admiring producer of Tartikoff, "He is simply the best in the business."

And so Tartikoff gets just about any table he wants at the Polo Lounge. Once he settles in, some of those at other tables venture forth to pay respects, like wedding guests in the first scene of "The Godfather." Some are producers vying for meetings. To one Tartikoff quietly promises, "Soon. Soon." Young (a measly 36), smart (Yale, Class of '70), shy but straightforward, Tartikoff tries to shrug off success the way most people would try to shrug off a bum date; he knows that everything about television, especially success, is transitory.

"I haven't been able to be like the guy in the Toyota commercial -- you know, jumping up in the air and saying, 'Yippee,' " Tartikoff says of his promotion from man of a thousand flops to reigning wunderkind. "We tried having parties, but they're never as exuberant as you would like. You know, it's so fleeting and ephemeral that there is no time. I mean, there is no time.

"My wife former New York City Ballet dancer Lilly Samuels and I had a nice hour fight before I came over here today, because she said, 'Come on, it's July, and why are you working so hard?' And it is July, and I guess we could be sitting back and saying, 'What a wonderful year it was.' I'm sitting there saying, 'What am I gonna do if "Misfits of Science" is a turkey?' "

However "Misfits" fares when it premieres in the fall, NBC's fortunes are almost blindingly bright. Last week it became the first network in history to log $1 billion in prime-time "upfront buying," sales to top advertisers that reflect confidence in the new season schedule.

NBC will unveil only four new hours of series programming in the fall, the smallest number in years, and that four hours will include an anthology series executive-produced by Steven Spielberg himself; Spielberg will personally direct four episodes of "Amazing Stories" and has lured the likes of Clint Eastwood and Brian DePalma to direct others. NBC's comedy "The Golden Girls" is considered one of the most promising of any network's new starters.

The network's returnees are led by the biggest hit of the past season. After ABC had turned it down as lacking commercial potential, Tartikoff took a gamble last fall on "The Cosby Show." It turned out to be the best and most popular comedy in years and a pivotal factor in the network's stunning turnaround. Advertising time on "Cosby" will sell this year for up to $300,000 per 30-second spot, more than double the starting rates it posted a year ago and believed to be an industry record for a half-hour show. To make such victory sweeter, the critical kudos and prizes pour in, too. Last week, "Cosby" was one of several NBC programs cited in the Humanitas Prizes, which honor programs that embody ennobling values.

At the NBC affiliates' convention in early May, the smoochiest love-in since the Republicans renominated Ronald Reagan, both Cosby and Tartikoff got standing ovations. Referring to the one given Cosby by thankful affiliates, Tartikoff told the crowd: "Of course, for the past year I've been thanking him, too, except I've been on my knees." Asked if he would interrupt a private meeting with Tinker should Cosby call, Tartikoff says, "I did. That happened. I was in Grant's office a few weeks ago when Bill called from Las Vegas and I excused myself. I said, 'Listen, Grant, you're my boss, but this guy can make me successful.' "

Showing himself fairly adept at making a joke shtick during his boffo appearance before the affiliates, Tartikoff tried to describe "the mood" at NBC. "Last May, when we all got together in this very same hotel, we said we were cautiously optimistic. We had some success in the fall and when we met with you in January, we amended that to read 'cautiously aggressive,' " Tartikoff said. "Now, with a second-place season behind us, a good May sweeps in the works, I guess the term that best describes us is, cautiously wetting our pants."

To even his surprise, NBC won the May sweeps, the first ratings sweeps month (there are three each year) it had won since 1974. That led to the production of an in-house sweatshirt imprinted, "The Red Sea, The '69 Mets, The '85 May Sweeps." Three miracles. Shooting for First

Now it is in reach, but it seems almost to spook Tartikoff to talk about it: First Place, Network Holy of Holies, for a quarter-century, with a few lapses, the property of CBS. In his remarks to the affiliates, he jokingly referred to CBS as "the soon-to-be second-place network." Asked what he seriously expects and predicts, he says, "I would hope a year from now we'd have this conversation and you'd say, 'Do you think CBS is going to come back and challenge you, or who do you see as your real competition next year?'

"Most of what I'm trying to do now is to not do anything stupid, to not program myself out of what could be first place," Tartikoff says. "And you know, if the Spielberg show were to work in a big way Sunday at 8, that alone should make up for the margin of difference."

There are many serious problems to be dealt with, one of them the future, if any, of "Hill Street Blues." Once the flagship show of the new NBC, it now faces a sixth season that may be its last. Ratings have fallen from a 32-share season average in 1981-82 to a 24-share average last season. That means that on Thursday nights at 10, roughly 24 percent of the sets in use were tuned to "Hill Street Blues." Not enough.

Tartikoff says the show's new producers have a mandate to fix the program. Some peripheral characters have been jettisoned and old rituals, like opening each show with a roll call, are out. Tartikoff told the producers he would rather open the show with "a shot of one of our regulars walking down the beach in the South of France. I don't know what that has to do with 'Hill Street Blues,' but that is more in the direction of what it's going to take to open up the show and save it.

"It's still a very profitable show for us," Tartikoff says. But, "if it were next year to be a 23 share, I think everybody would pack it up."

"Saturday Night Live" is another one-time trendsetter whose future is in doubt. Tartikoff almost canceled it in May. At one point he toyed with the idea of luring producers John Moffitt and Pat Tourk Lee over from HBO's "Not Necessarily the News" to produce it, but HBO chief Michael Fuchs scotched the plot. Before that, Tartikoff had talked with Lorne Michaels, the founding father who produced the first five years of the show. The talks broke off. Now they are on again.

Tartikoff not only weathered the transition from failure to success, he also made a graceful segue from one NBC regime to another, from the combustible Fred Silverman, kicker-in of elevator doors, to the Fila-and-Perrier style of Grant Tinker. Industry heads were turned when Tartikoff stayed on after Silverman beat a cacophonous retreat. "I felt I enjoyed a very symbiotic, complementary relationship with Fred," says Tartikoff. "I was not to him what Al Capone used to have around the table in 'The Untouchables.' There was a difference in styles between us. I felt I was sort of learning about programming at the master's feet. I was getting knowledge and know-how listening to him, watching him in action, hearing his war stories.

"But there was a side to me that veered away from Fred and is common ground with Grant. It matches nicely with the things Grant looked to do. The thing is, I'm not a blue or a green person. There's a little green in me, a little blue in me." Nine for Nine

Television is no art and programming the blasted thing is no science. Brandon Tartikoff the big success is the same guy who programmed failure for several seasons. "Fortunately, there's a benevolent management that allows you to stay past your errors," Tartikoff says. "I made some pretty stupid mistakes over the last three or four years. I did some things right but in the fall of '83, the way it was constructed, I deserved to have a lot of failure."

He pauses.

"Whether I deserved to have nine for nine . . . " Tartikoff introduced nine new shows; all nine bombed. It was Tartikoff's Tet. His contribution appeared to be having dragged the third-placed network down to somewhere below the bottom of the barrel. "People kept writing, 'CBS won the week, ABC was second, and NBC was a dismal third,' " he recalls of his own dark ages. "Not just third, but 'a dismal third.' I thought I'd have that on my tombstone." Some affiliates began calling for his scalp. Even NBC insiders began to soften in their expressions of unquestioning support.

At this point, Tartikoff could have quit and gone off to be the head of one of Hollywood's big studios, which change leadership the way Baskin-Robbins changes flavors of the month, and put NBC behind him. But he didn't.

"I didn't want to spend the rest of my life saying, 'Well, that was the best I could do,' " Tartikoff recalls. "All the money that somebody was going to give me, or even if I had success someplace else, I would have been haunted by it. When it was darkest, January of 1984, when we were putting on what might have been my last slate of programs, because we had failed miserably and everybody was well aware of it, I didn't really want to go out that way, saying the best I could do was this. I wanted to have some feeling that I was a success, that I had mastered whatever these jobs are supposed to be. I didn't want to be this bitter guy walking on the beach saying, 'If only I had listened to the research, if only I had gone with my instincts.' "

As rumors of his imminent departure from NBC spread, so were old stories about his poor health revived. To be young, gifted, failing -- and dying. "It wasn't bad enough that people were saying, 'He's fired, he's incompetent, he's ruining the place, why is Tinker hanging onto him?' " says Tartikoff. "It wasn't enough for this lovely town to just say all that. It was also, 'He's dying.' " Tartikoff sighs. "I did have cancer. It's considered in remission, or cured, or whatever."

Tartikoff has been compared to Irving Thalberg, the MGM production genius who died young. "I was talking about Thalberg the other day. I said, 'If only I could die right now, I could have an award named after me,' " he laughs. "With my luck, I'll probably stay and go back to third place, and I'll be a trivia question."

At the moment, his luck is anything but bad. Tartikoff admits mere luck has played a role in NBC's resurgence, that the network's renaissance is tied to competitors' blunders as well as his own brilliant maneuvering. "I think this will not, by the way, last forever, but there have been some really uninspired decision-making program choices being made by both ABC and CBS," Tartikoff says. "And I don't discount that. I'm quite aware that I can't expect forever that they're going to go on putting on shows and not really come up with their 'Cosby' or 'Miami Vice.' "

"Miami Vice," the sleek, chic, MTV-ish adventures of two drug-busting Florida undercover cops, is a key Tartikoff show. He put it on last fall even though audience research suggested it would fail. "My tendency is to give the competitor the benefit of the doubt and to fear the worst for us," he says. The show became a hit with young adults, the most important demographic group to advertisers. Now, in summer reruns, it has consistently been in the top 20.

While that hunch played happily for Tartikoff, he's put on other series knowing they were probably doomed and being ruefully proven right -- crash divers like "Hot Pursuit" ("I just didn't think the leads were compelling"), "Partners in Crime," "V" and "It's Your Move," among many others. A programmer cannot possibly expect to put on only good programs; he has to be basically amoral about it. "Sometimes you put on what you do just because you don't have anything else," Tartikoff says. He is asked how many bluntly rotten shows he might have on the schedule at any one time.

" 'Rotten' is a subset of what you have to do," he explains, unoffended by the use of the term. "There is in every given schedule in any given moment of time at least one show, or one hour, or sometimes more, of shows that you know in your heart are not going to work. Now they fall into two categories: rotten and well intentioned."

How many shows can he expect to be proud of? "I would say if everything goes right, probably, like, 50 percent of the schedule. I think we're about two or three hours short of that.

"I'm a different creature than Grant," Tartikoff says. "I'm proud of 'The A-Team.' I'm proud of it on several levels. I'm proud because it went on to be the number one show in America; you know, there's something about saying, 'I figured out something that 40 or 50 million people watch.' And you're also proud of it in that no one has been able, since it's been on the air, to copy it, as they did with 'Real People' and 'Diff'rent Strokes.' "

Tinker bad-mouths "The A-Team." He'll even argue with you if you try to tell him it's a harmless, fun show. Tinker's been a sterling chairman for NBC (and a fiendish cost-cutter), but he could never program the network, because his good taste would get in the way. Tartikoff does not have that problem. Indeed he says candidly and perhaps correctly that the television traffic will not bear too many "quality" shows in prime time.

"Shows like 'St. Elsewhere' and 'Miami Vice' compete with each other," Tartikoff theorizes. "There's a certain audience that used to watch 'Hill Street Blues' religiously and now watches 'St. Elsewhere' or 'Miami Vice' religiously. They're not couch potatoes. They're mobile, they go out, they spend money, which is why advertisers want them. But they are not going to stay home on Wednesday and Thursday nights to watch television, so those shows end up competing for the same viewer.

"If you did a network of all 'Cheers,' 'Hill Streets' and 'St. Elsewheres,' the nights would compete with each other and you'd split up the available audience." Obviously, Tartikoff does not see it as his mission to rid television of mediocrity. It wouldn't be good business. He's just going to alleviate the suffering a little. Man for All Seasons

Tartikoff, like his mentor Silverman, lives, breathes and talks nothing but TV -- ratings, shares, overnights, tracking surveys, awareness polls. He dares you to pick a season in the recent past whose NBC program schedule he can't recite off the top of his head. He remembers that January 1981 was the month when the Iranian hostages came home only because live coverage of that event played havoc with the premiere night of his new Tuesday schedule: "Sheriff Lobo," "BJ and the Bear" and "Flamingo Road."

His 2 1/2-year-old daughter Calla Lianne is not quite aware that it's daddy who puts on those funny funny TV programs, including "The Smurfs," her favorite. "The only thing that has embedded itself in her consciousness is that I work at 'the peacock,' " Tartikoff says. "Actually, she calls it 'the peacod.' "

Tartikoff often brings scripts and cassettes home with him, takes few vacations, is at his Burbank office from 9:30 a.m. until 7:30 p.m., pausing on occasion to make bets with his vice presidents about how shows will do in the ratings. "There's only one good match-up every month," he says. He is paid less than $500,000 a year to program NBC, a piddly salary when one considers that a single prime-time rating point advantage in the TV season ahead will be worth an estimated $79 million in added revenue to the network that has it.

An English major at Yale, Tartikoff never imagined himself going into television. He thought he'd get into something legitimate. "When I was 11 years old I wanted to be a professional baseball player. When I was in college, I wanted to be a novelist. I wrote a novel my senior year at Yale. It was very Donald Barthelme. The title is 'Long Novella.' Set in a mythical place called Long Novella. And also the pun." Would he like it to be published now? "It would probably be very embarrassing."

When promoted to president of NBC Entertainment in 1980, Tartikoff was the youngest division chief in the history of the company. He was paid $175,000, less than his counterparts at other networks. "I used to say, 'Why don't I make as much as the other guys? I'm better than they are.' They'd tell me, 'Get better ratings and prove you are.' "

He did. And he did. He's the Billy Jack of network survivors.

He doesn't do it on instinct alone, though. Tartikoff defends his reliance on research in deciding which shows get on the air.

"The way we use research is, when you see a show you really like, then put it on and use the research to -- well, 'Miami Vice' tested terribly," Tartikoff says. "It tested the worst of any of our new shows last year. Most of the research on it was ignored -- but some of it was used to reconstruct the pilot. We had a two-hour pilot that had about six flashbacks in it, and that totally confused the audience. All we did in the two-hour pilot is, we reconstructed the piece to make it a linear two-hour film. And the ratings built the night that it aired.

"A lot of our successes at NBC have come out of failed projects that we just juggle. 'Hill Street' came from this failed pilot that Bruce Paltrow and Steve Bochco did the year before, called 'Operating Room,' which was a comedy-drama about the professional and personal lives of four young doctors in a hospital who had a beach house at Malibu and whatever. And when we finished with 'Operating Room,' we went back to Bochco and Paltrow and said 'The audience is not going to accept this with doctors. When they go to doctors, they want them to be totally professional. They don't want to know that they've been out getting drunk until 3 o'clock in the morning the night before. Why don't we try it with cops?'

"And Paltrow says, 'I'm not interested,' and Bochco says, 'Okay.' After 'Hill Street' broke the ground, we went back to Paltrow and said 'Maybe now they're ready for it.' " Voila: "St. Elsewhere," about the professional and personal lives of doctors in a Boston hospital. It begins its fourth season in the fall with Paltrow as executive producer.

For Tartikoff, success has not radically improved an essentially pessimistic outlook. Between long bouts of dedicated worrying, he does appear to be enjoying himself. "I think it's nice for my wife when we go to places. People don't come up and say, 'Hang in there, kid,' any more," Tartikoff says. "I don't think I'm going to be doing this for a long, long time. I have a contract that goes two more years. It depends on what Grant's commitment is. When I'm doing minor variations on things that I did before, when I wake up and it's June or July and I'm saying, 'Well, "Cheers" worked with a white-collar girl and a blue-collar guy, so maybe we should go with a white-collar guy and a blue-collar girl,' then it's time to let somebody else try."

He stops a moment to ponder. Hmmm, a white-collar guy and a blue-collar girl. Boy Genius files it away in his brain. He is then reminded about a trade paper advertisement which asked, "Has NBC Reached the Promised Land?" and he answers that question, "No. We had a little vacation there in May, and now we're back outside the walls of Jericho, or whatever it was." And the CBS eye is peeking out the peephole, momentarily and very nervously afraid to blink. It's justifiable paranoia when Brandon Tartikoff is lusting after your turf and you know that if anybody can evict you, he can.