Writing a great character can be tricky. Even harder is creating a character arc that makes your audience want to come back for more. Think about your own favorite film or television characters. Jack Torrance. Walter White. Keyser Söze. Patrick Bateman. Freaking Homer Simpson. What qualities do they have? What emotional buffet do they carry that craves a second, third and fourth serving? Character evolution is the root of any compelling story, and for HBO’s Silicon Valley, it takes a team of talented writers and producers to figure out what exactly will come next.

Stepping into its fourth season, the show’s story lines and characters are taking a turn from the Pied Piper clickfarm scandal that left us hanging last season. All our favorite familiar faces (and foes) are back with Richard (Thomas Middleditch) struggling with an idea that could change his future—building a new internet.

No Film School spoke with co-executive producer Clay Tarver to learn exactly how the writers carved out the character arcs and narratives for this season.  

No Film School: In season four, the story line is reinvented as Richard steps away from Pied Piper to find his own new path. As writers, what was the underlying theme to push his character along?

Clay Tarver: We wanted to get a little bit more internal with Richard and have him take a leap of faith. Tech is an interesting business because the people in it are always pivoting. They come in with an intention to build something great, and then the thing people respond to isn’t necessarily the thing you expect them to or even want them to.

In Richard’s case that seemed like an interesting dilemma—the thing people wanted from him was his video-chat app, but he doesn’t want to go around just pitching a better version of Skype. We always felt the biggest thing in the show was his algorithm. It’s Richard’s soul. If his soul isn’t being used to change the world, then what is it all about?

"We wanted to ask what happens if everyone around you wants to do this thing but you know it isn’t your dream—what you’re born to do."

NFS: So Richard is going through a mid-algorithm-life-crisis?

Tarver: In a way. We wanted to ask what happens if everyone around you wants to do this thing but you know it isn’t your dream—what you’re born to do. We wanted Richard to pursue a new idea and see if he could have success without failing his soul.

Silicon ValleyCredit: John P. Johnson/HBO

NFS: What kind of through line did you want Richard and the rest of the characters to tow this season?

Tarver: We wanted the guys to not want all the same thing. Richard was always doing the right thing to be the moral guy. Sometimes in this business, you have to be a little bit of a bastard. Where that line is can be pretty tough to figure out.

There were times when everyone thought Richard was a pussy and he’s unfit to be the CEO of Pied Piper. Now, it’s really about him trying to grow, be stronger and push back. Some of the stuff he handles well, others, he’s in a place where he may or may not want to be. He grows to be kind of a tough leader.

"If we did an episode about how Gilfoyle was a secret Christian, the audience would be like, 'Who is this guy? I don’t want to know anything about him ever again.'"

NFS: After three seasons, you’ve pinned a lot of identity and personality into the characters. The audience feels like they know them. How did the staff add new elements to characters' personas without making them feel out of place?

Tarver: You always want to be careful. In sitcoms, there can be that joke, that sort of thing that happens where it’s the exact opposite of the character you know and love. It’s not exactly disciplined. We look for things that the character can evolve in a surprising way as opposed to eating your seed corn. If we did an episode about how Gilfoyle [Martin Starr] was a secret Christian, the audience would be like, "Who is this guy? I don’t want to know anything about him ever again."

To give an example, in an episode last year, Jared [Zach Woods] ended up being the one who had any handle on how to deal with the opposite sex. It’s an attribute that’s a nice surprise and makes you think more of the character instead of being less interested in him. You always want to find something that doesn’t diminish your characters.

Silicon ValleyCredit: John P. Johnson/HBO

NFS: Obviously the tech-talk among the characters carries authentic weight. How often do you guys speak to people working in the real Silicon Valley?

Tarver: We go up once a year to the area and we read a bunch about different companies going into a season. Mike [Judge] always wants to bring a level of authenticity. We do our homework and spend a lot of time on research because the real stuff is much more interesting than anything you can make up.

Judge is always quoting Dr. Dre: “If it plays in the hood, it will play everywhere.” And that is sort of the idea. If we get it right for the people who know, I think everyone else—even if they don't get every reference—they'll still feel there’s an authenticity to the show.

NFS: What does it take to keep a show going for multiple seasons on HBO?

Tarver: It’s interesting. We had a really awful thing happen to us when one of our key actors Christopher Evan Welch died toward the end of the first season. He played Peter, the money man behind Pied Piper. When everything settled, we brought in Russ Hanneman [Chris Diamantopoulos], the new money guy and it seemed like a lot to do after all the changes. But it played to the reality of this rapidly changing tech world and what it’s really like to be a CEO and have a startup—one day you’re on top of the world, the next you’re about to run out of business.

The touch-and-go part of the startup world is pretty accurate to the experience in this show. For us, people have been really engaged with that. The trick is progressing the characters enough to give them victories and growth.

Silicon ValleyCredit: John P. Johnson/HBO

NFS: But don’t forget. The show is funny as hell.

Tarver: That doesn’t hurt either. It’s funny. I think in a way, Pied Piper is the neediest character in the show. The characters are not working tons of hours a day and we’re well aware we have all these jokes—jokes that only belong in our show. A lot of other shows will have an episode about tech or have that one geek that knows so much, but for our show, there’s a certain satirical thing we do and that’s what we try to focus on.

NFS: Is it difficult packing everything into 10 episodes?

Tarver: The show is rigorous but we don’t have a real excuse to mess something up. The tech world is interesting because the stakes are so high. If you run the table and it hits, you’re a billionaire. When has that happened in human history for a 25 year-old? For us, it’s a wild ride that we hope feels fresh for our audience. 

Season 4 of 'Silicon Valley' premieres April 23 on HBO.