The entertainment industry loves computer hackers. But how those hackers go about their business is rarely portrayed accurately. Hollywood’s understanding of hacking usually boils down to furiously typing random keys on a laptop while meaningless countdowns, codes, animations appear on the screen.

Then came the drama-thriller series "Mr. Robot," about a group of elite hackers with a mysterious agenda to take down a powerful corporation using their knowledge of cyberspace. General audiences took notice, as did critics, who lavished praise on the show for its writing and performances.

Perhaps just as importantly, real-life hackers took to the internet to praise the show for its surprisingly on-the-mark depiction of what hacking really is. "Mr. Robot" began to air in 2015, and continued for four seasons before coming to a natural conclusion. The show also made stars out of its cast, particularly lead actor Rami Malek, who has since gone on to establish himself as a successful leading man on both the small and big screens. Here are 14 facts about the conception and execution of "Mr. Robot" that you might not have known about.

Mr. Robot was originally meant to be an indie film

Considering how much praise has been lavished on "Mr. Robot" for pushing the boundaries of television and making excellent use of the medium’s episodic format, it is surprising that it was originally meant to be a low-budget movie.

The creator of the series, Sam Esmail, was a writer and an aspiring filmmaker (hence the many cinematic references in his work, like "Mr. Robot" mirroring "Fight Club" at many points). Esmail was known in Hollywood as a writer, but found that producers were unwilling to let him direct. Deciding to take matters into his own hands, Esmail wrote and directed his first film, the low-budget indie "Comet" in 2014. He originally intended for "Mr. Robot" to be his follow-up to "Comet" as his second feature film.

But while writing the script for "Mr. Robot" the movie, Esmail realized he had too much material for a two-hour feature. "When I saw it as a movie I knew where I was going," Esmail explained to Forbes. "I knew the ending. It was either I had just gotten too long-winded or the story just asked for more characters or more storylines to develop. When I got to page 90 and I was still halfway through Act 1 that’s when I decided, ‘Okay. This can be a television show.’"

The main character’s journey is a reflection of the show’s creator’s life experiences

At the center of the plot in "Mr. Robot" is the character Elliot Alderson (Rami Malek), a brilliant but socially awkward hacker. Elliot is part of a group of hackers who aim to erase consumer debt by taking down one of the biggest banking companies in the country. The hackers carry out their attacks with the belief that their actions will lead to a more just and equitable world.

For Sam Esmail, the creator of the show, the central themes of "Mr. Robot" reflect his personal journey in life. "Elliot is a thinly veiled version of myself," Esmail admitted in an interview with THR. "I wrote what I knew because a lot of the details of his life and the loneliness were issues I’ve dealt with basically my whole life."

The topic of consumer debt is also one close to Esmail’s heart. In a 2015 interview with HuffPost, Esmail, who was 38 at the time, revealed that he had only recently been able to pay off all his student loans, adding, "It feels like a system that wants to keep people in debt, whereas its intention was to boost the economy."

Mr. Robot was inspired by real-life socio-political revolutions

While Elliot’s journey and motivations were a reflection of the show’s creator Sam Esmail’s personal life experiences, those were not the only inspirations behind the show’s creation. In past interviews, Esmail has spoken about how two significant socio-political events of the 21st century, the financial collapse of 2008 and the Arab Spring, helped him formulate a story about the importance of hacking in modern society.

Esmail told NPR that the worldwide economic crisis that occurred between 2007 and 2008 prompted him to imbue Elliot with a desire to bring about an economic revolution. "Because I was so moved [by news of the crisis]," Esmail explained." I was so horrified by the financial collapse and how the top 1% were doing these really criminal activities on a large scale and getting away with it."

Another major source of inspiration was the Arab Spring, when online hackers became key figures for the exposure and dissemination of information in defiance of dictatorial governments. According to Esmail, he felt inspired by "seeing how technology helped people in the Arab countries rise up and have a voice and start a revolution."

A desire to set the record straight about hackers

It has become something of a running joke how little Hollywood truly understands about cyberspace, and the tendency of movies and shows to liken computer hacking to sorcery with a QWERTY keyboard. This sort of representation was unacceptable to "Mr. Robot" creator Sam Esmail, who wanted to tell a story that authentically portrayed hacker culture.

Esmail’s interest in computers and hacking started at an early age. From pirating games on Commodore 64 to using Bulletin Board Systems to dial into other people’s homes and leave them messages in the early ’90s, Esmail was deeply familiar with the hacker lifestyle from a young age. Because of his expertise, the movies that Hollywood was churning out about hackers failed to meet with Esmail’s approval.

"There were all these [movies], they just never… When they got to the hacking, it was like they always defaulted to this weird thing about CGI 1s and 0s flying at you," Esmail explained in an interview reported by Vox. "And it was just silly. And even when the movies tried to be serious — there was "Swordfish" and "Strange Days" — it still always fell flat. And to me, I always felt like the culture was incredibly interesting, why not just represent it authentically? So it was always in the back of my head."

A commitment to authenticity

We’ve already seen how deeply involved the creator of the show, Sam Esmail, was in the hacking subculture. But Esmail knew he could not rely on his knowledge alone to make sure every aspect of hacking on the show would be accurate.

Esmail brought on Kor Adana as a writer and consultant. Adana had worked on other shows as a writing consultant, but it was "Mr. Robot" that allowed him to delve fully into his past life as a cybersecurity consultant. "Sam was ecstatic when he learned that I had a career in cybersecurity in my previous life," Adana explained to The Drum. "I used to do what Elliot does at Allsafe."

Adana was part of the show’s writing team during the conceptualization process for individual episodes. Once shooting started, Adana’s other duties began as a full-time tech consultant, advising on a myriad of issues ranging from the use of prop electronics, to how the actors use technical jargon, to what they type during hacking scenes. His duties did not end there, as Adana explained, "In post-production, I work with Sam and our editors to make sure the timing and logic of our tech screens make sense."

Emmy Rossum recommended Rami Malek for the lead role

Before he signaled his arrival as a leading man in "Mr. Robot," Rami Malek was largely stuck in supporting roles in film and television. At the time when the show was being cast, Malek was nowhere on the radar for the casting directors. It took a fortuitous intervention by Emmy Rossum, who was dating Sam Esmail at the time, to get Malek in the room for the lead part on the show.

The actor credits Rossum with drawing the attention of Esmail’s team to him. "Emmy had seen me in the HBO show ‘The Pacific,’ Malek told IndieWire. At that time, Esmail had auditioned a great many actors for the lead role of troubled hacker Elliot Alderson without finding that spark he was looking for.

Still, Rossum’s recommendation didn’t mean the hurdles were over. Once Malek was in front of the team for his audition, he had to deal with the heavy nature of the script he was supposed to interpret as Elliot. "He was shaking," Esmail told THR. "He literally said the script breeds anxiety. It was nerve-wracking. I was like, ‘Is he gonna get through this audition?’" Fortunately, Malek did make it through his read, and Esmail knew he’d found his lead actor.

The hoodie was Malek’s personal connection to Elliot

On "Mr. Robot," Elliot Alderson suffers from a host of mental issues, including social anxiety disorder, clinical depression, delusions, and paranoia. Naturally, such a person would hardly be interested in the latest fashion trends. Elliot is mostly seen wearing the same black hoodie, which has become iconic among fans.

But what many fans don’t know is that the hoodie originally belonged to Malek himself. According to the show’s costume designer, Catherine Marie Thomas, the hoodie was a part of Malek’s feel for Elliot from the start. "It’s his personal one from the pilot," she told People. "It’s the one he loved more than anything on the planet. We keep telling him that the hoodie is going to fall apart and he’s going to have to wear another hoodie at some point! But he has a sort of sentimental attachment to it I think, which makes sense."

The hoodie had become such an important part of Elliot’s look that Thomas and her team kept a lineup of identical hoodies that had been carefully treated to have the same lived-in look, in case anything happened to the original hoodie. A special hoodie was also made that could stand some wear and tear for the scenes in which Elliot is in peril.

A special way to get into character as Elliot

Rami Malek’s performance as Elliot Alderson is equal parts unnerving and heartbreaking. Elliot suffers from so many mental problems that he is often withdrawn from the real world, lost in his own musings that the audience hears via voiceover. Depicting this aspect of Elliot was challenging, and Malek hit upon an innovative means of acting detached from the real world as Elliot.

While filming the scenes with the voiceovers, Malek would wear a small earpiece in which Elliot’s inner dialogue is played for him. A female crew member read the lines of the dialogue, which was an unusual choice. Usually, a crew member would deliver the lines on cue cards off-screen. But that process did not work for Malek.

"I don’t like that method," he explained to GeekWire. "Because I think that when there’s a P.A. or someone reading, it alters everyone’s performance. I want to keep it secure and personal and have my thoughts only affecting me. I want to be having to hide things." Malek personally conducted auditions to decide who would be the voice in his ear, and settled on a female to perform the dialogues because he imagined the voice being female in his head.

Carly Chaikin almost lost out on the role of Darlene

"Mr. Robot" features one of the strongest casts in recent television history. Carly Chaikin wowed viewers in the role of Darlene Alderson, Elliot’s sister and a member of the same hacker community as him. Chaikin brings a great deal of depth to the role of the outwardly cynical and jaded Darlene, to the extent that it is difficult to imagine anyone else in the part.

As it turns out, the makers of "Mr. Robot" could not at first imagine Chaikin as Darlene, so much so that they did not even want to audition her for the role. "Susie Farris was the casting director," Chaikin revealed during an episode of At Home With the Creative Coalition. "She suggested me to Sam Esmail, the creator, and Chad, our producer, and Sam — like, literally, they laughed and were like, ‘Absolutely not.’ Because they knew me from ‘Suburgatory.’"

One of Chaikin’s earliest breakout roles was as the blonde and bitchy Dalia Royce on "Suburgatory," who was very far removed from what the producers of "Mr. Robot" were looking for in Darlene. But after auditioning many other actresses for the part who did not make the cut, the casting director managed to turn their attention back to Chaikin. As the actress explains, "Then finally they were like, ‘Okay, fine, bring her in.’ They were not looking forward to it. And then I came in and read with them and then obviously they changed their mind."

The special device created for the drug use scenes

Since the time of "Sherlock Holmes" novels, troubled geniuses in fiction have often resorted to the use of drugs to deal with the pressures of having such brilliant minds. Elliot Alderson is part of that elite group of brilliant drug users, snorting morphine on multiple occasions in between plotting the demise of evil corporations.

To convincingly pull off the drug use scenes without actually doing drugs, Rami Malek had to treat the whole thing like a magic trick. To that end, the actor took the help of a special vacuum device that was built to be concealed on his person. The drug that Malek pretended to snort was actually redirected into the vacuum, so Malek would not have to keep putting the stuff up his nose for every retake.

Oh, and that stuff Malek pretended to put up his nose was not morphine, but rather crushed vitamin B pills. This allowed him to play a prank on the show’s crew by pretending to get high on set. "No one really knew that I had [fake morphine and the vacuum]," Malek told Seth Meyers. "So I would sit there the first day it came in with the crew and just like line up these huge rails of vitamin B pills. And they didn’t know, so they’d be looking at me like ‘Dude what’s wrong with this guy?’"

Robert Downey Jr. became slightly obsessed with the show and Rami Malek

As good as "Mr. Robot" was, it was still a relatively niche show that did not get a lot of exposure in mainstream media. But the series did have a huge following among Hollywood’s elite, specifically Robert Downey Jr.

The "Iron Man" actor revealed during an episode of "The Ellen DeGeneres Show" that he found Rami Malek’s performance so compelling on "Mr. Robot" that he messaged Malek via email in hopes of befriending him. "I was such a fan of ‘Mr. Robot,’ I basically emailed you," Downey Jr. explained to a blushing Malek. "and I was serial texting you and I was trying to FaceTime you and you didn’t let me weird you out and now we’re friends."

On his part, Malek stated that he ignored the MCU star’s initial emails because he could not believe Robert Downey Jr. would personally message him. Eventually, Malek realized he really was ignoring the overtures of Iron Man himself, and got back to Downey Jr. "This friendship has continued," said Malek. "You came to visit me on set, I couldn’t believe that."

The secret of the famous single-take episode

Right from the beginning, the makers of "Mr. Robot" made it clear that they were not interested in sticking to any television conventions. From its unique characters to the very obscure world of cyberwarfare that the show faithfully depicted, "Mr. Robot" was never afraid to push the limits of what could be achieved in a show.

One of the most impressive examples of this commitment occurs in Season 3, Episode 5, "Eps3.4_runtime-err0r.r00." In the episode, for more than 40 minutes, audiences follow Elliot and Angela as they race through the offices of E Corp while a riot staged by FSociety breaks out. What makes the episode so ambitious is that it is shot to look like one continuous, uninterrupted scene from start to finish.

So did the makers of "Mr. Robot" really somehow manage to film the entire episode in a single shot? Not really. Much like with the movies "Birdman" and "1917," the episode was filmed in multiple takes, and editing tricks were used to make the whole thing look like a single take. "I can’t tell you the number of conversations between myself and Justin, the first AD, of how to create the stitch so that visual effects could take it and then make it truly seamless," the show’s director of photography Tod Campbell told IndieWire. "I mean, oh my God, we could easily spend an hour talking about how to stitch. It was crazy, it really was."

The creator of the show also directed most of the episodes

"Mr. Robot" carries a very distinctive style that’s closer to cinema than TV shows. This was no accident. Most shows have a revolving door of directors who come in to direct various episodes across seasons.

In the case of "Mr. Robot," starting from Season 2, its creator, Sam Esmail decided to also take on the responsibility of directing each episode in addition to heading the writing and research team. In the end, Esmail wound up directing 38 of the full 45 episodes of "Mr. Robot."

"I am so very specific in how I want to shoot the show and the visual grammar of how I want to tell the story," Esmail explained to Variety regarding his decision to become the solo director of the show. "It’s nothing against our directors in the first season, because they were all great to work with. For me, it feels like it would be easier to manage day to day. I’m on the set every day anyway, and I just think it would make the whole show be more efficient."

Rami Malek had to take typing lessons to play Elliot

In order to play the lead in "Mr. Robot," Rami Malek had to get into Elliot’s troubled headspace. But that was not all. Equally challenging was the task of learning to act like a master hacker, especially since Malek himself is less familiar with technology, as he told Stephen Colbert, "(I knew) nothing at all. I’m a terrible typer too. It’s so sad."

According to Malek, his first instinct when it was time to film the hacking scenes was to mash a bunch of random buttons as fast as possible. "I did start to do that, but I quickly got reprimanded. They’re like, ‘You’re not playing the piano.’ Because that’s what it looked like."

Malek’s performance was so bad that he was required to take lessons to improve his form, but those didn’t really end up helping either. "I had to take typing lessons," Malek explained. "Someone actually came to my house and gave me typing lessons. And after a few sessions of that I was like, ‘No, I can cover this with just pure acting.’"