Samberg attended elementary school with his future Brooklyn Nine Nine co-star Chelsea Peretti. He discovered Saturday Night Live as a child while sneaking past his parents to watch professional wrestling on television. He was obsessed with the show and his devotion to comedy was frustrating to teachers, who felt he was distracted from his schoolwork. Samberg graduated from Berkeley High School in 1996, where he became interested in creative writing and has stated that writing classes "were the ones that [he] put all [his] effort into. . . that's what [he] cared about and that's what [he] ended up doing". He attended college at University of California, Santa Cruz for two years before transferring to New York University's Tisch School of the Arts, where he graduated in 2000. Writer Murray Miller was his roommate.