The Pineapple Incident

"The Pineapple Incident" is the tenth episode in the first season of the television series How I Met Your Mother. It originally aired on November 28, 2005 on CBS. It is the highest viewed episode in the first season and the second highest overall episode during the nine seasons run of the series. It was one of the most acclaimed episode of the series.

Plot
At MacLaren's, Barney, Marshall, and Lily criticize Ted for overthinking every aspect of his life, rather than simply acting on a whim. Barney convinces Ted to take five shots of bartender Carl's special blend called "Red Dragon;" Ted claims that he can still function cognitively even under the influence of the alcohol, but shortly afterwards he blacks out. He wakes up the next morning with a girl he does not remember beside him in bed, a pineapple on his nightstand, a sprained ankle and his coat partially burnt. Ted asks Marshall and Lily about the night and they tell him that he sang along with the jukebox in the bar while standing on a table. He also repeatedly drunk dialed Robin, who was on a date with a wealthy businessman. He fell off the table, spraining his ankle and Marshall and Lily took him up to his bed. However, they are surprised when Ted asks about the girl on the bed and can shed no light on the pineapple or why Ted's coat is burnt.

Ted calls Barney, thinking that he might know what happened the night before but finds him sprawled in their bathtub. Barney recounts that Ted reappeared at the bar around 1 a.m., but when he began to call Robin again, Barney lit Ted's coat on fire. After some more time spent at the bar, he put Ted back into bed, although similarly has no idea who the mystery girl is. Ted finds that someone wrote on his arm, saying to call the number if Ted was found passed out somewhere. Ted calls the number and reaches Carl, who fills in some more of the story: Ted again returned to the bar at 3 a.m., but Carl refused to serve him. Ted told Carl the meaning of the word "karaoke" and that he wanted to go see some penguins at the zoo, then suddenly called someone and told her come over and do something "crazy". Based on this information, Marshall, Lily, and Barney believe that the mysterious girl in Ted's bed is actually Robin, but as Ted goes to wake her up, Robin calls and tells him she is coming over to discuss the previous night.

The girl in bed, Trudy (Danica McKellar), wakes up and explains her side of the story: she had seen Ted's drunken dancing and they exchanged numbers in the ladies' room of the bar, which Ted had entered and used accidentally. She told Ted the meaning of the word "karaoke" and about her love for penguins, which Ted later mentioned to Carl. It was she whom he later called and invited over, not Robin. Ted tells Trudy to hide when Robin comes over to talk, and Trudy leaves via the fire escape before Ted can show her to Robin to prove that he has moved on. Future Ted explains that Trudy never responded to his subsequent message, and he never did work out where the pineapple came from, but that it was delicious.

Production
Carter Bays later admitted he learned a lesson from this episode to not write themselves into a corner. The line "we never found out where the pineapple came from" was something they never should have said. The mystery of the pineapple was solved in a deleted scene from the season 9 episode "Daisy". The scene was released online by BuzzFeed. In the clip, The Captain has a pineapple on his porch, and explains to the gang that he practices the tradition of putting one outside as a "symbol of hospitality". This leads Ted to remember stealing an identical pineapple from The Captain's house when he was very drunk.