The Goat (How I Met Your Mother)

"The Goat" is the 17th episode in the third season of the television series How I Met Your Mother and 61st overall. It originally aired on April 28, 2008.

Plot
The episode begins with the aftermath of the events of "Sandcastles in the Sand": Barney and Robin are in bed together after having sex and they agree to pretend it never happened. However, Barney feels quite awkward and uncomfortable around Ted at MacLaren's later in the day. Hoping to find an excuse for his and Robin's actions, Barney seeks out Marshall to help him find a loophole in the Bro Code, a book listing the rules and philosophies of Barney's life as a "bro". Allegedly written by Barnabas Stinson in the 18th century, the Bro Code proves to be a very tight document that Ted has followed flawlessly and Barney fails in finding a loophole.

When Marshall's nervous behavior reveals to Robin that Barney told him, she warns him never to let Ted find out. That night, when Barney picks up Ted in a limo, he attempts to give Ted an ultimate 30th birthday by flying him to Las Vegas, which includes staying at the Bellagio, steaks at Boa, and a boxing match between Floyd Mayweather and a grizzly bear. When Ted asks about the sudden trip, a guilt-ridden Barney then tries to reveal that he slept with Robin, only for Ted to reveal he already knows as Robin told him right after she warned Marshall. Ted then angrily ends his friendship with Barney, and hails a cab to take him home.

Meanwhile, Lily rescues a goat named Missy when Farmer Frank (Alan Fudge) brings the goat to her kindergarten class and horrifies her students by going into great detail about what will happen to Missy when she visits the butcher. Lily plans to give the goat away to animal control, but becomes attached to her while waiting for Ted to arrive at his birthday party. Future Ted hints at the destruction the goat would do, only to later realize that he had the story wrong: everything involving the goat actually takes place during his 31st birthday, at which point – Future Ted also reveals – Robin is living in the apartment.

Critical response
Donna Bowman of the A.V. Club graded the episode at A−. She says that the previous episode has potential for more Barney-Robin material, even if the fallout from the episode can affect all the characters.

Michelle Zoromski of IGN gave the episode a 7.7/10 score.

TV Critic gave it 27/100 saying that "the attempts at humour and the entire goat sub-plot are pathetic".