East Meadow transplants Craig Gerard and Matthew Zinman made it big on the West Coast, but in the real world and their fictionalized television universe, they were stuck on Long Island.

Specifically, the Long Island Rail Road's "Drunk Train," stopping at Jamaica, New Hyde Park and, if you overslept, Babylon; and life in East Meadow, where they grew up.

The best friends are writers for the CBS series "How I Met Your Mother." The sitcom follows the story of how architect and romantic Ted Mosby (Josh Radnor) meets and falls in love with his wife. The story, set in Manhattan and told in flashback, tracks friends Barney Stinson (Neil Patrick Harris) and Marshall Eriksen (Jason Segel), along with Alyson Hannigan, as Marshall's wife, Lily Aldrin, and Cobie Smulders as the journalist and former Canadian teen pop star Robin Scherbatsky.

The show is ending after nine seasons and will air its final episode on March 31, as Barney marries Robin in an East End ceremony in Farhampton, otherwise known to Long Islanders as Montauk. Zinman and Gerard's persistent pro-Long Island nudging among their writing cohorts gave the area a starring role in the series' ending, from the suburbs of Nassau to the beaches of Suffolk.

"We just talked about East Meadow all the time," Gerard, 31, said from the show's Los Angeles offices, days after the last episode was filmed. "I think they agreed to put East Meadow into the show if we stopped talking about it."

In a recent season, Marshall and Lily leave Manhattan, where the show's characters live and play, and move to East Meadow to raise their family.

"We just kept on pitching," said Zinman, also 31. "We were kind of acting like they were living in East Meadow."

The story line marked a rare departure for the sitcom, then in its seventh season and largely set in apartments and bars on the Upper West Side, and, for a time, "DoWiSeTrePla," which is fictional city shorthand for Downwind of the Sewage Treatment Plant.

Though Manhattan is often represented in sitcom addresses, zooming in on Long Island is less common.

"Long Island has been underrepresented in the vast array of suburbs," said Robert Thompson, professor of television and popular culture at Syracuse University, from which Zinman and Gerard graduated in 2004. "More sitcoms have taken place, than any others, in the 'unnamed suburb.' "

One memorable episode titled "The Drunk Train" was written by Gerard and Zinman, who riffed on what Long Islanders know as the Long Island Rail Road's last train from Penn Station, usually before 3 a.m. on a weekend.

Before penning that episode, the pair had slowly mined their lives for comedy while working to become staff writers. Their resumes are nearly identical. They became friends in the fifth grade, at Woodland Middle School in East Meadow, and later graduated from East Meadow High School. The friends journeyed north to Syracuse, majoring in Television, Radio & Film, where they formed a writing partnership in screenwriting classes. A sample script for the sitcom "Curb Your Enthusiasm" was an early product of their labor. After graduating, they threw themselves a farewell party in Zinman's backyard in East Meadow, then drove to California to pursue their careers.

"Writing can be an isolated thing," Zinman said. "You don't know how people are going to react to it."

As they hunted for work, they lived in a "little halfway house for everybody that was moving to L.A.," Zinman recalled. Gerard got a job as a production assistant for the show "Listen Up" that was on for one season. In the first season of "How I Met Your Mother," he was a writer's production assistant and later became a writer's assistant. Zinman worked as a production assistant on "CSI: Miami" and also had various production assistant jobs on shows like "The Loop" and "Still Standing." He joined "How I Met Your Mother" in the third season as a showrunner assistant. Zinman and Gerard were promoted to staff writers midway through season 5. They ended the series as co-producers on the writing staff.

Aside from providing "a lot of food and snacks," Gerard said, his early experience just a few years out of Syracuse meant seeing "how much fun the job looked, even when I was still kind of on the outside."

While watching writers and proofreading scripts, Gerard said he realized "a lot of the best stuff comes out of true events."

"Anything that happens to us happens to other writers, and could be a fun story," he said.

The writers room, Zinman said, "was a safe place to share your personal stories."

They wrote the blog for the character of Barney, a bachelor who has "authored" a men's friendship handbook called "The Bro Code." Trips home to East Meadow inspired other story lines.

"We would come home, go back to New York over Thanksgiving, go into the city and see our friends and take that train home," Gerard said of the early-morning train. "Crazy, fights all the time. We got back to work and that idea was on the board for three years. People loved it, but we couldn't figure out a way to do it."

Long Island as a characterThe show introduced the Long Island story line in ominous fashion. In the episode "46 Minutes" -- dubbed for the time it would take by train to arrive from Manhattan to Long Island -- Barney tells a boyfriend of Robin that "something terrible happened."

"Long Island," he explains.

In another episode, Barney and Ted ride "The Drunk Train," described by Lily as "just a bunch of drunk, sloppy idiots fresh off a night of partying in the city desperate to hook up with anything that moves."

Ted introduced himself to female passengers, saying he was an architect, or that he was from Manhattan. The women, with thick South Shore accents, each time replied, "You think you're better than me?"

The show designed a packed and rowdy train set, with glass bottles flung, shattering against the train walls and couples making out.

The depictions were eerily familiar to Long Islanders such as Melissa Kreinin, 25, of East Meadow, who works in a guidance counselor's office. She said she has long abandoned those 2:39 a.m. train rides. During one excursion, she recalled, "Two girls were fighting, and in a blink of an eye, police were there."

Other episodes depicted East Meadow as an isolated suburban trap. One story line had Robin living temporarily with the Eriksens, writing about Long Island in a journal as if she were a cultural anthropologist.

"Dear Diary. It is Day Four on this Island, which the natives have dubbed Long Island," she narrates, "perhaps referencing how each hour here feels like it may never end."

The trapped story line came from another writer who "treated East Meadow, or Long Island, as a prison, and he kind of like did an 'Apocalypse Now,' with Robin kind of trapped in this house for the weekend," Zinman said.

"We couldn't disagree more," Gerard said.

Television observers said the show's East Meadow detour helped capture the sitcom's central theme.

"The moment somebody moves away, they're not going to be there at night, that's the end of everything, that's the death of our youth, and that's what the house was," said Donna Bowman, who reviews episodes for the A.V. Club, a pop culture website, and teaches theology at the University of Central Arkansas.

Thompson said a shift to Long Island helped distinguish the story from other shows about twenty- and thirtysomethings.

"That move was an attempt to show these people were going to have to grow up," he said. "Unlike 'Seinfeld,' which kept showing these young, independent Americans playing together, being friends and never growing up. You can't stay in the TV series 'Friends' your entire life."

Far, far, 'Farhampton'

The "How I Met Your Mother" series finale has long had fans speculating over the particulars of the show's title. It was revealed that Ted meets the mother at a Farhampton rail station after Barney and Robin's wedding, and the final season has taken place over the wedding weekend.

"To me, that train station says Farhampton, this is the end of the line," Bowman said. "I really resonate with the fairy-tale nature. Where does 'happily ever after' happen? It happens in some land far away. There's kind of a magical aura."

For Zinman, who is married, and Gerard, the wedding and end of the characters' journey has parallels to real life. Many of their friends have wed in the past few years, and Gerard and Zinman are moving on professionally as well. They have already written a pilot, which they sold last year to NBC and learned recently was not picked up.

Wherever the next writing gig takes them, Gerard and Zinman will bring Long Island along for the ride.

"You try to write where you know," Gerard said. "Wherever we write in the future, it's always going to be coming from the experience on Long Island."

Top Stories

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months
ACT NOWSALE ENDS SOON | CANCEL ANYTIME