The circles are everywhere, if you know to look for them. They’re on the whiteboards around Dan Harmon’s office, on sheets tacked to his walls, on a notepad on the floor of his car. Each one is hand-drawn and divided into quadrants with scribbled notes and numbers sprouting along the edges. They look like little targets.

Harmon, 38, is the creator of Community , a sitcom about a group of community-college study buddies and the most giddily experimental show on network TV. He began doodling the circles in the late ’90s, while stuck on a screenplay. He wanted to codify the storytelling process—to find the hidden structure powering the movies and TV shows, even songs, he’d been absorbing since he was a kid. “I was thinking, there must be some symmetry to this,” he says of how stories are told. “Some simplicity.” So he watched a lot of Die Hard, boiled down a lot of Joseph Campbell, and came up with the circle, an algorithm that distills a narrative into eight steps:

1. A character is in a zone of comfort

2. But they want something

3. They enter an unfamiliar situation

4. Adapt to it

5. Get what they wanted

6. Pay a heavy price for it

7. Then return to their familiar situation

8. Having changed

Harmon calls his circles embryos—they contain all the elements needed for a satisfying story—and he uses them to map out nearly every turn on Community , from throwaway gags to entire seasons. If a plot doesn’t follow these steps, the embryo is invalid, and he starts over. To this day, Harmon still studies each film and TV show he watches, searching for his algorithm underneath, checking to see if the theory is airtight. “I can’t not see that circle,” he says. “It’s tattooed on my brain.”

Harmon tells me this over dinner on a midsummer night in Hollywood. He’s a big dude, dressed in jeans and a green plaid button-down, with graying stubble and faint raccoon lines under his eyes, evidence of his erratic sleep habits. The first time we met, months earlier in a New York City bar, we spoke for nearly three hours, during which time Harmon barely made eye contact. He communicates openly online, writing lengthy blog entries about struggles in his work and personal life. But face-to-face, he needs a few hours and a few drinks to warm up.

Harmon has dedicated the past three years to Community , the story of a fast-talking lawyer named Jeff Winger (played by Joel McHale) who is disbarred and forced to slum it in a community college. There, he’s partnered with an A-team of outcasts, including a crass geriatric (Chevy Chase), an uptight striver ( Mad Men ‘s Alison Brie), and a pop-culture savant named Abed (Danny Pudi), who acts as the shows unofficial narrator, constantly applying movie and TV analogies to every predicament. (It’s Abed who points out that the show’s setup—misfits hanging out in a school library—is very Breakfast Club .) The characters spar, trade zipline-fast put-downs, and occasionally make out.

It may seem a humdrum premise, but in fact Community is a brazen, incorrigible shape-shifter—a comedy that, in any given week, might take the form of a Claymation fantasy or a Dungeons & Dragons game. Even its “normal” episodes have a deeply weird velocity to them: This is a series in which a dorm-room blanket-fort can sprawl into a shantytown and where a trampoline becomes a spiritual temple.

Harmon doesn’t seem like the kind of guy you’d find running a $45 million-a-year network sitcom. He spent much of the past decade working on the web, turning out low-budget, artfully goofy Internet videos with titles like Computerman and Laser Fart . But at their core, even his most asinine web shorts were subtly bound by the same laws that apply to TV comedies, which demand relatable characters, cohesive story lines, and third-act life lessons. In fact, Community feels like a kind a secret handshake—or maybe a loving noogiefest—between two worlds: the nimble, anarchic aesthetic of cheapo online comedy and the comforting structure of a mainstream sitcom. It’s a risky mix, but “Dan’s like a cat burglar breaking into an art museum,” says his leading man, McHale. “He can dance around those lasers and make it look easy.”

Fittingly for a show with so much Internet-friendly comedy—pop-culture allusions, sight-gag Easter eggs, and hyperaware self-commentary— Community has attracted a spazzily enthusiastic online following. After every episode, the web is besieged with tributes and exegeses in the form of recaps, animated GIFs, and arcana-packed Tumblr pages. (One site ran a 1,300-word oral history on a character named Magnitude, whose total screen time amounts to less than 10 minutes.) By network standards, Community ‘s ratings are modest, but its desirable demographics—young, educated, and somehow still able to buy stuff—were enough to get the show a third season. When judged by the metrics of fandom, however, the series is a monster. It has made Harmon part of a new breed of celebrity show runners who are almost as famous as the programs they create.

Not that Harmon seems to be enjoying any of this. Heading a network TV series is far more pressure-packed than churning out DIY web videos, and Harmon now has to answer to a cadre of executives and coworkers. This doesn’t come easily to a guy whose Zucker Brothers-level wit is offset by Zuckerbergian social skills—a combination that’s gotten him fired in the past. When he’s working on the show, Harmon rants, fumes, and constantly threatens to quit. “That’s my morphine button,” he says of the prospect of leaving. It’s the fail-safe option for ending the constant pain.

But doing so would leave too many stories unfinished, for both Community and Harmon himself. The circles are everywhere, if you know to look for them.

1. A character is in a zone of comfort

2. But they want something

It’s 4:45 in the afternoon at Community ‘s LA headquarters, and inside an airless writers’ room, Harmon slugs down a five-hour energy drink, picks up a near-drained tumbler of vodka, and stares at a text-jammed whiteboard. He and a half-dozen writers are stuck on a scene in which one of the Community regulars goes head-to-head with guest star John Goodman. The scene is just two guys talking, but nobody can figure out how the conflict should play out.

Harmon begins pacing the room, slowly launching into a discourse that’s part Socratic inquiry, part one-man improv show. He lists examples of anything in the culture that might show how powerful men treat the weak: Goodfellas , Neil LaBute films, Freudian theory, even the actorly essence of Goodman himself. The whole spiel is immensely entertaining—like hearing a version of Billy Joel’s “We Didn’t Start the Fire” that’s been rewritten by a semiotics-obsessed video-store clerk—and it concludes with Harmon reenacting Ned Beatty’s famous monologue in Network.

By the time he’s finished, it’s clear that the soliloquy, with all its melodrama and bluster, is the blueprint they need. The writers start riffing plot points and one-liners and quickly find the beats of the scene, which Harmon drops into a circle on the whiteboard. The steps are there. The embryo is valid.

Harmon is an articulate guy, but he often uses film or TV references as a form of shorthand—a way to convey a tone he wants to capture or an idea he wants to get across. It’s a habit that goes back to his youth. He grew up in the lower-middle-class suburbs outside of Milwaukee. His parents worked a lot, so he amused himself by watching reruns of Taxi and The Bob Newhart Show , or fun-junk obscurities like Manimal and Misfits of Science .

Early on he started picking up on things that other kids missed: the way The Bob Newhart Show experimented with freezing and unfreezing its end credits, or how Moonlighting would change genres from episode to episode. His earliest revelation about how the TV medium worked—one that heavily influences Community —came courtesy of a Cheers board game he spotted at a toy store. He realized that the characters were so relatable and their dynamics so clearly defined that anyone could step into their lives—even in a board game.

Harmon is listening to a demo of a piece of music for an upcoming episode: “Oh, God! I wanna fucking blow my brains out.”

When he wasn’t obsessing over Cheers or Knight Rider , Harmon was happily spending hours by himself—sometimes alone in a closet. He was always most comfortable being off in his own world. It was calming, almost meditative, but it didn’t teach him a lot of social skills. By the time he got to high school, the only way he could adapt was through comedy. He took up improv, which uncorked his talents and lifted his social standing. “Class clowns are never allowed to date anybody decent,” Harmon says, “but you don’t get beaten up, you’re invited to parties, and everybody likes you.”

Still, Harmon wanted more than to amuse his classmates; he wanted to build a career. In the early ’90s, he moved to Milwaukee and started doing stand-up. At the comedy clubs he met Rob Schrab, an illustrator and fellow comic who shared many of Harmon’s pop-culture obsessions: Die Hard, Star Wars, Dungeons & Dragons.

The two soon became writing partners, working on everything from sketch comedy to radio bits. One of their collaborations was Scud: The Disposable Assassin , a darkly funny robot-revenge comic book created by Schrab. Harmon wrote a few issues, and when Oliver Stone optioned Scud , they moved to Hollywood to work on the script, not realizing that Stone had other writers in mind.

Finding themselves in LA without a steady gig, Harmon and Schrab started working on new ideas, eventually selling a Goonies -style ghost story called Monster House to director Robert Zemeckis—a deal that made them a hot property in Hollywood. Soon they were hired by ABC to come up with ideas for new shows. One day, while talking about the TV series they’d loved as a kid, they hit upon the concept for Heat Vision and Jack , a knowingly ridiculous homage to The Six Million Dollar Man . The show followed an astronaut who had gained superintelligence by traveling too close to the sun and whose best friend had been fused with a motorcycle. When an ABC executive quickly rejected the pitch over the phone, it only made Harmon want to write it more. “Dan hates being told what to do,” Schrab says. “If you say, ‘Don’t do that: You’ll die,’ he’ll say, ‘Well, I’m gonna do it anyway.'”

3. They enter an unfamiliar situation

4. Adapt to it

Heat Vision was written in a weekend, eventually making its way to Ben Stiller, who directed a pilot for Fox. Starring Jack Black and Owen Wilson, the show was full of dense pop-culture spoofery and lacked a laugh track, both of which were unusual in network TV at the time. Copies of the pilot were eagerly swapped around Hollywood, but Fox passed, sending Harmon into a deep depression. “I didn’t leave my apartment for a month,” he says.

To make things worse, Monster House was put on indefinite hold. With both projects dead, Schrab and Harmon’s luster began to fade, and the two had difficulty finding work. Frustrated, and with time on their hands, they started videotaping movie parodies and sketches just to amuse each other. It was the early 2000s, and good-quality digital cameras were getting cheaper. Harmon and Schrab soon discovered a slew of similarly minded video artists, some of them frustrated writers and directors who felt stifled by the Hollywood system. After holding a series of screenings at Schrab’s apartment, they came up with Channel 101, an organization that was part website, part film festival.

Launched in 2003, Channel 101 functioned as a sort of anarchic democracy: Contributors went online and submitted five-minute “pilots” of such homemade comedies as the sci-fi time-travel adventure Time Belt or the fictionalized music documentary Yacht Rock . Each month, an LA audience would gather to screen the pilots and vote on which series to renew for another month and which to cancel. Channel 101 allowed Harmon and Schrab to reclaim their outsider-wunderkind standing, and while they didn’t get rich from it, they established an online comedy portal long before YouTube or Funny or Die. For years, Channel 101 was one of the few places young comedic talents could get their work seen, a fact that drew such future web phenoms as the Lonely Island, whose teen-drama parody The ‘Bu was one of Channel 101’s first big hits.

Harmon says Channel 101’s voting system was established partly because he believed in meritocracy—that a show’s survival ought to rest entirely on the audience. But he also didn’t want to be the bad guy who got yelled at when he rejected other people’s work. Harmon didn’t want to deal with confrontations.

5. Get what they wanted

6. Pay a heavy price for it

7. Then return to their familiar situation

“Oh, God! I wanna fucking blow my brains out.”

It’s another day in the Community offices—one that will stretch until nearly dawn—and Harmon is listening to a demo of a piece of music for an upcoming episode. He dictated the melody to a composer and can’t understand why this version sounds different. He gripes about it for a few minutes, lets it rest, and then starts griping again. “I often have inappropriate emotional reactions to things,” he says, “where other people would say, ‘Oh, it just needs some adjustment.'”

The others in the room barely look up; they’re used to these outbursts. Harmon swears he’s not difficult to work for, but being in a room with him for 15 hours a day certainly isn’t easy. He’s dismissive of some of the show’s directors, has meltdowns in the editing bay, and drinks during the day, a fact he attributes to his unusual hours. (Despite having been around Harmon while he’s drinking—and drinking with him—I’ve never seen him actually drunk.) Even Harmon’s biggest supporters acknowledge his mercurial tendencies. “It’s hard, because he’s really passionate,” Community writer Megan Ganz says. “He cares about his work in a way that he doesn’t necessarily care about other people.”

In 2006, Harmon and Schrab were hired by Sarah Silverman to work on her eponymous Comedy Central show. But Harmon found himself unable to get in sync with Silverman, arguing over the direction of the show’s writing. He was let go after just a few episodes. “I was inexperienced and oversensitive,” Harmon says. “Sarah would email me notes, and they’d hurt my feelings.”

Harmon’s departure became sizable news within the industry, even getting mentioned in Time . Schrab decided to stay on the show, creating a rift in the duo’s partnership (and friendship) that took nearly a year to resolve. Around the same time, a heavily retooled version of Monster House hit theaters, prompting Harmon to rethink whether he wanted to write movies in the first place.

Fans know that oddball shows like this one tend not to stick around. So they savor each episode accordingly.

Harmon found himself once again looking for work. In the mid-2000s, he took a Spanish class at an LA community college. He thought it might be a good—if maybe a bit too mainstream—setting for a fish-out-of-water sitcom. When he heard that a producer working with NBC was interested in doing something with him, Harmon pitched the idea and sold Community .

From the second episode—which included a hilarious and yet perfectly plausible scene in which Chase and McHale dress in homemade robot costumes and fight in slow motion—it was clear that Harmon’s idea of a mainstream sitcom was slightly askew. This may be why Community ‘s online fans are so rabid: These are people for whom Arrested Development was a weekly religion, and they know that shows as endearingly oddball as Community tend not to stick around for long. So they savor and celebrate each episode accordingly.

Harmon, for all the abject misery he feels when he’s making the episodes, savors the show just as much. Community is a series by, for, and about people for whom pop culture is both a near-divine presence and a lens through which to view the world. When a character compares an onscreen relationship to Sam and Diane, or Abed notes—at the start of a Goodfellas homage—that he’s always wanted to be in a mob movie, it’s not a gimmick. It’s Harmon’s way of reaching out to those who love this stuff as much as he does.

“I’m trying to connect with people the best I can,” he says. “I don’t really have a lot of appropriate feelings for people on an individual basis, but I’ve always wanted to make people happy. When they tweet and say, ‘Your show is good,’ I’m like the Lawnmower Man—hovering and taking in positive bits of energy. I don’t need more than that.”

8. Having changed

In the Community episode “Critical Film Studies,” Jeff Winger—the sarcastic ex-lawyer—agrees to meet Abed for dinner. It turns out Abed had recently landed a walk-on role on his favorite show, Cougar Town , and during filming he realized his onscreen life was richer than his real life. He’d wasted his time meticulously analyzing every piece of pop-culture esoterica he could find, Abed explains, and now all he wants, for once, is an honest conversation with somebody.

Jeff, normally an under-sharer, gives it a go, ultimately revealing some of his deepest insecurities. Then he learns the real reason for their meeting: Abed didn’t want a conversation at all. He simply wanted to reenact the Louis Malle classic My Dinner With Andre .

Most Community fans assume Abed has Asperger’s syndrome. Many of the signs are there: His inability to pick up on others’ feelings, his tendency to relate more to film and TV than to actual people, his obsessive analyzing and categorizing of events. From the beginning, Harmon didn’t want to specify the character’s pathology, but out of curiosity he eventually started looking into Asperger’s.

“So, in a very naive way—and I’ve never told anybody this before—I started researching the disorder,” Harmon says. “I started looking up these symptoms, just to know what they are. And the more I looked them up, the more familiar they started to seem. Then I started taking these Internet tests.” The tests came up positive.

When he began writing Community , Harmon thought the character he related to most was Winger, who had “all the defense mechanisms that I acquired,” Harmon says. But the more online tests for Asperger’s he took, the more he began to wonder if he was just as similar to Abed. It had never occurred to him before, he says, because he has always been so oversensitive.

Eventually, Harmon met with a doctor and came to understand that symptoms of the disorder lie on a spectrum, and that in fact there is a place on it for people with inappropriate emotional reactions and deep empathy. Harmon now sees that he may fit somewhere on that spectrum, though figuring out exactly where could take years.

When he created a TV character who relates to the world through television, Harmon didn’t realize that he was, in a sense, inserting himself into his show. Ever since he recognized this, writing in Abed’s voice has gotten much easier; all Harmon has to do, he says, is “open up my memory.” And he has learned to understand himself a bit better, including why—like Abed—he sometimes unintentionally hurts those around him.

At the end of “Film Studies,” Abed offers Jeff an apology-slash-explanation for the Andre stunt. He wasn’t trying to manipulate or fool him. Instead, he’d picked a movie about two distant friends because it was the only way he could convey to Jeff how he felt about their own friendship. Abed, like the guy who created him, was simply trying to connect.

Illustrations: Trae Patton/NBC

Contributing editor Brian Raftery (brianraftery@gmail.com) wrote about America’s Funniest Videos in issue 19.05.