This is loosely based on Woody Allen's experiences as a young comedy writer who married young, and met an older man who taught him about life, comedy, and philosophy (and who was institutionalized).
When Woody Allen cast Jason Biggs, he thought Biggs was Jewish. During filming, Allen began talking to Biggs about Rosh Hashanah. Biggs, not knowing what to say, told Allen that he was Catholic. Allen said at the Venice Film Festival, "I saw him in that pie movie (American Pie (1999)) and I thought he was a Jew."
Jason Biggs filmed this during the day, and then performed opposite Kathleen Turner in the stage adaptation of "The Graduate" on Broadway in the evenings.
Jerry's reference to a very funny comedian who wrote "Never Trust A Naked Bus Driver" was referring to Jack Douglas, who also wrote "My Brother Was An Only Child".
Carlo Di Palma, Allen's former cinematographer, had intended to come out of retirement to work on this movie. Di Palma had to have a physical exam so the studio could determine if he was an insurance risk. Di Palma failed the physical, and was unable to shoot the film as the studio would not insure him. He died two years later.