‘Silicon Valley’s Kumail Nanjiani on Dinesh’s Fashion ‘Don’t’ and the Season Finale

John P. Johnson/HBO
The Pied Piper crew look at "Pipey".

Getting rejected by a pretty girl can have its perks. When Silicon Valley’s Dinesh (Kumail Nanjiani) created a video-chat app so that he and a female coder could properly flirt online, its crystal-clear resolution caused her to kill their romance once she saw he wasn’t the “Pakistani Denzel” he’d claimed.

But now the app has gotten him more industry attention than anything he and his friends have achieved together with their troubled compression engine Pied Piper. We chatted with Nanjiani about whether Dinesh has game and how this season’s wrap-up may be less of a nail-biter.

Has Dinesh ever had a girlfriend…or sex?
He’s had sex. But not a lot of sex. And the past few years have been especially unkind. Like how it gets harder to get employment the longer you’re unemployed. It’s been a long time, and it’s getting harder and harder for him to be cool around ladies.

RELATED: Silicon Valley is Using Google to Publish Fake News Stories in Search Results

Is it true that his much-ridiculed gold chain was inspired by a real-life “style don’t”?
Yes. Every summer the writers say, “Hey, tell us stories about your life!” I said that I didn’t shake hands with a woman until I was 18 and that made it into the show. The chain story happened to me in high school, except it was silver. I remember I used to clean it with an old toothbrush. So pathetic!

Kumail Nanjiani displays Dinesh's fashion "don't": a gold chain.

Kumail Nanjiani displays Dinesh’s fashion “don’t”: a gold chain.

Is Dinesh’s success going to break up the band?
Basically, we’ve been a pretty good unit so far. We’ve had infighting but seen that core Pied Piper group stick together. I don’t know how sure that’s going to be going forward.

RELATED: Silicon Valley‘s Thomas Middleditch Downloads His Tech Preferences

Can you say anything about what goes down?
Last season ended on a cliffhanger. This time, it’s not that kind of cliffhanger. The tale we’ve been telling wraps up, and then the episode’s final five minutes kick off next year’s storyline, which is going to be different from anything we’ve done before.

Silicon Valley, Season finale, Sunday, June 26, 10/9c, HBO.