If you thought comedian and actor Kumail Nanjiani was hilarious on TV, you should see him in person. As the closing keynote speaker at our FutureStack16 conference in San Francisco, Nanjiani, who plays Dinesh on the hit HBO show Silicon Valley, had attendees in stitches as he recounted tales of how he got his start in comedy, the similarities between tech startups and show business, what he thinks about the real Silicon Valley, and much more. Here are some highlights from his fireside chat with Fortune Senior Writer Leena Rao.

A role that he can (sorta) relate to

Long before he played a programmer on TV, Nanjiani studied computer science and had a job as an actual programmer, albeit (according to him) not a very good one. “I had a day job doing programming very poorly—that’s where I break the stereotype,” he said. “I was very bad at it. I didn’t get fired, because I was the nice guy, but there would be people fired all the time who were better than me and they’d say, ‘Why am I getting fired? You should be the one getting fired!’ And I was like, ‘Well, that’s the attitude that got you fired.’”

Getting his big break

After living in Chicago for about five years, programming by day and performing standup by night, Nanjiani decided it was time to give comedy a serious shot, so he moved to New York City. There he got his first big break, writing for the Comedy Central show Michael and Michael Have Issues, starring Michael Showalter and Michael Ian Black.

Showalter and Black told Nanjiani that if he was writing for the show then he had to act in it as well. The only problem? “Comedy Central didn’t know me, so I wrote a part for myself (a character named Kumail) that I had to audition for … four times.”

kumail nanjiani at futurestack

Kumail Nanjiani on stage with interviewer Leena Rao.

A “loving homage” to Silicon Valley

From his first gig on Michael and Michael Have Issues, Nanjiani then went on to roles in a number of shows, including the hit Portlandia, Adventure Time, The Meltdown with Jonah and Kumail, and even the recent reboot of The X-Files.

When he landed the role of Dinesh on Silicon Valley, which he described as a “loving homage” to the real Silicon Valley, he was thrilled to work with Mike Judge—and to be able to work with his old standup buddies from Chicago, Thomas Middleditch (who plays Richard on the show) and T.J. Miller (who plays Erlich).

But people didn’t initially understand it would be set in the modern day. “They’d ask if it was set in the late ’90s. And I’d say, ‘No, the sh*t going on right now is waaay crazier’ but people didn’t know that,” said Nanjiani. “Now, four years later, people are very aware of Silicon Valley culture … it really affects everything we do. And I think that’s the appeal of the show, and what makes it more mainstream, is that it gives people insight into a world they know nothing about but affects their lives every day.”

When asked how he prepared to play the role of Dinesh, Nanjiani said, “I’ve always played very nerdy guys, and I know that may come as a shock to you—I know you’re thinking, ‘But you look like a stud’—but it wasn’t just about playing a nerd. For my character specifically it was more about understanding his motivations. Dinesh is an immigrant like I am, and I find a lot of people I know are very driven and want to succeed in a new land, so that was the genesis of the character. This guy wants to prove to his parents and to himself that he can make it here. He has this hunger that can ultimately become destructive.” 

Why acting is similar to being at a startup

At one point in their conversation, Rao put Nanjiani on the spot and asked him what he doesn’t like about Silicon Valley—perhaps a dicey topic when speaking at a San Francisco tech conference. After a “next question” and an initial “Um, nothing,” he responded that “It’s obviously very sad when someone pours themselves into a startup and works hard and it just doesn’t happen. It’s heartbreaking. It’s like being a struggling actor—it’s so rare to be on a show that you like, that other people like, and that critics like. So I know how lucky I am to be on the show…. There’s a lot of luck involved in getting those first couple big breaks because there are a lot of talented, funny, good-looking people in New York and Los Angeles.”

When Rao called out Nanjiani’s obvious omission of San Francisco, Nanjiani was quick to explain: “San Francisco doesn’t have an entertainment industry. You guys actually make real things.” Of course, Silicon Valley has its own celebrities—which Nanjiani found quite strange and amusing. “It’s interesting to see how some people are super famous just here, like Silicon Valley’s Brad Pitt or something,” he said.

kumail nanjiani and lew cirne at FutureStack

New Relic CEO Lew Cirne helps Kumail find an anagram of his name to launch his own “empire.”

The best and worst of social media

So, what’s the app Nanjiani can’t live without? Despite having its pros and cons, he says Twitter. “Twitter exemplifies the best and worst of social media,” he said. “It gives you access to way more people who think like you. It lets you justify your point of view and think it’s an okay way to think … but there’s also people who disagree with you.”

As he put it, “The world is getting smaller and you’re going to have to reckon with people who don’t believe what you do. I don’t think you need to understand what they believe, but you need to be okay with it and understand that they have a right to have a point of view. Right now, especially, will be interesting times for people, and that’s the big challenge: how are we going to be okay with people who don’t think like you?”

Bonus Silicon Valley teaser

Between Nanjiani’s words of wisdom and funny stories, Rao also made sure to slip in a question about what fans can expect on the upcoming season of Silicon Valley. For one, look for the return of the characters “Action Jack” Barker and Russ Hanneman. But even more important, said Nanjiani, “This season is very character-heavy, and while I can’t say exactly what happens, what I will say is that there are some surprising rifts and alliances that happen … it sounds like I’m talking about Game of Thrones.” Hey, a Silicon Valley/Game of Thrones mash-up sounds good to us!


Photos: © Andrew Weeks Photography.

Asami Novak is director of content strategy and development at New Relic. Prior to joining the New Relic team, she wrote marketing and ad copy for a variety of B2B and B2C companies. Her editorial writing has appeared in WIRED and Dwell, among other publications. View posts by .

Interested in writing for New Relic Blog? Send us a pitch!