Long after the scripts were written and production had started for the new HBO comedy "Silicon Valley," the show's creators continued to gain inspiration from the headlines: "San Franciscans protest the Google bus" ... "Tech-fueled gentrification sparks controversy" ... "A venture capitalist goes rogue" ...

"While we were shooting, more and more craziness kept popping up in the worldwide news coming from Silicon Valley," creator Mike Judge ("Beavis and Butt-Head") remembers. "We knew it was about time to do a show like this, but we didn't know the timing would be this good."

As much as the Bay Area has provided a fertile ground for technology innovation and investment, it has created a nurturing environment for popular entertainment as well. The Bay Area computer engineer, with his bad hair and no-eye-contact sales pitch to create the next world-saving app, has belatedly joined New York cops and Los Angeles lawyers on the list of Hollywood's favorite protagonists. It's a pop culture trend that shows no sign of ebbing anytime soon because Silicon Valley, figuratively and often literally as well, is this century's version of the Old West as far as Hollywood is concerned.

Show predecessors

"Silicon Valley," which has already garnered rave reviews in advance of its premiere Sunday, was preceded by the Amazon Prime show "Betas," another half-hour comedy featuring startup misfits as protagonists. At the time of his death, Philip Seymour Hoffman was at work on yet another tech-world show, "Happyish," for Showtime. Randi Zuckerberg, sister of Facebook founder Mark, co-produced the short-lived startup-based reality show on the Bravo network. Even PBS has dipped a toe in the water, backing "Everything But the News," a San Francisco-based Web series that follows a fake reporting team as they lightly skewer tech culture in the Bay Area.

Less than a year after the first Steve Jobs biopic hit movie theaters, a second is in the works, to be directed by David Fincher from a script by Aaron Sorkin ("The Newsroom"). The two previously teamed up for the film "The Social Network."

That 2010 film about the founding of Facebook, yielding Academy Awards and a nice profit, proved that the seemingly boring pastimes of writing code and discussing funding models could be spun into humor and dramatic tension. For the first time since the 1970s, Hollywood seemed to be interested in the Bay Area for something more than just its pretty landmarks.

Judge worked as a programmer in Silicon Valley for about a year in the 1980s and made the 1999 cult comedy favorite "Office Space," which featured a computer programmer in the lead role. "Silicon Valley" executive producer Alec Berg has a brother who worked in Silicon Valley.

'That's real'

During a recent phone conversation, both say they were striving for a realistic Bay Area vibe.

"I think sometimes the best satire is the stuff where you just accurately portray it and people laugh at it," Berg says. "They say, 'That's hilarious. How did you come up with that?' And you say 'That's real. That actually happened.' "

In "Silicon Valley's" eight-episode first season, the scruffy group of app developers at the core of the story encounter several so-funny-it-could-be-real scenarios, including a sad but expensive launch party featuring Kid Rock and a pair of narcissist executives who can't stop talking about the good they're doing for the world.

The company featured in the show, called Hooli, seems like a composite of Apple, Google and maybe Oracle. It operates on a futuristic campus where employees take bike meetings - six or seven people convening on an elongated human-powered vehicle that looks like something out of the "Yellow Submarine."

Bay Area realism

"Everything But the News" goes a step further. The exploits of fake "PBS NewsHour" reporter Steve Goldbloom are mostly scripted, but the interviews with Uber CEO Travis Kalanick and executives at local dating websites are very real.

"You only notice the bubble when you step out of it," Goldbloom says. "You go to any other city, and you realize the people in every other coffee shop are 90 years old. And they're not way cooler than you, with no interest in serving a latte."

Bay Area realism is a new approach for Hollywood, which for decades filmed San Francisco through a smoggy L.A. lens. Shots of the Golden Gate Bridge, the Painted Ladies and little cable cars climbing halfway to the stars were plentiful. But shows such as "Charmed," Monk" and "Full House" rarely reflected or even referenced the area's deeper cultural or social identity, even superficially, much less in a realistic way.

By contrast, Hollywood in 2014 can't get enough of the visual that the new knights in shining armor might be untucked, uncommunicative nerds who can barely function around the opposite sex.

Arguably, the last time Hollywood got obsessed with Bay Area culture was during the late 1960s and 1970s, when some of the same publications that are writing about Silicon Valley in 2014 were similarly enthralled by the Bay Area counterculture movement. Hippies and high-profile crimes including the Zodiac murders fueled productions such as "Play It Again, Sam," "Dirty Harry," "Play Misty for Me" and television's "The Streets of San Francisco."

"There was a lot talk about the Summer of Love and the feelings it created," she says. "The impression I had is that it wasn't happening anywhere else. I think there was a way filmmakers felt, that they could show something that hasn't been seen before."

Close to 40 years later, Judge and Berg have a similar viewpoint. Berg says the "Silicon Valley" L.A. writers are constantly scanning headlines coming out of the Bay Area, understanding that the next big breaking news might be relevant to the script they're working on.

"There are a lot of e-mails going around," Berg says. "We're all eating breakfast, e-mailing each other. 'Have you seen that story? That would be hilarious.' There was this piece a while ago about a Chinese Steve Jobs. All he did was steal the American version of stuff, and he would tell China that he invented it. And legally it's his. That seems like it would be a great character to be in a subsequent season."

Strong reception

Judge and Berg are both nervous about the authenticity of "Silicon Valley" and were happy when it got strong reception from a techie crowd during a South By Southwest festival screening last month. Judge says his favorite piece of feedback came from Google Executive Chairman Eric Schmidt, who makes a cameo in the pilot.

"He saw the footage of the party that we were going to cut him into, and he said, 'God, I've been to that party,' " Judge says. "That was a sign that at least we got it tonally right."