The Magician's Code

From Wikipedia, the free encyclopedia
Jump to: navigation, search
"The Magician's Code"
How I Met Your Mother episode
Episode no. Season 7
Episode 23 (Part 1)
Episode 24 (Part 2)
Directed by Pamela Fryman
Written by Jennifer Hendriks (part 1)
Carter Bays & Craig Thomas (part 2)
Original air date May 14, 2012 (2012-05-14)
Guest appearance(s)

Lyndsy Fonseca (Daughter)
David Henrie (Son)
Chris Elliott (Mickey Aldrin)
Becki Newton (Quinn)
Ashley Williams (Victoria)
Vicki Lewis (Dr. Sonya)
Rob Huebel (Mr. Flanagan)

Episode chronology
← Previous
"Good Crazy"
Next →

"The Magician's Code" is the hour-long final episode of the seventh season of the CBS sitcom How I Met Your Mother.[1] It aired in two half-hour parts on May 14, 2012.[2][3]


Part 1

Lily starts going into labor, but refuses to go to the hospital until Marshall is there with her. Ted and Robin try to distract her with stories from their past until her contractions are four minutes apart, and Lily finally agrees to go to the hospital.

Meanwhile, Barney and Marshall are stuck in Atlantic City following the events of "Good Crazy" and must find a way back to Manhattan for the birth. Barney offers to help Marshall on the condition that Marshall's son has the middle name "Wait-for-It". Marshall agrees and Barney manages to secure two seats on a bus to New York — only for Marshall to realize that the destination refers to the state of New York and not New York City; its final destination is actually Buffalo. The two are left trying to find another way back to the city when several senior citizens on the bus, inspired by Marshall's predicament, claim to be having heart attacks to force the driver to take a detour to the hospital where Lily is giving birth.

Lily starts giving birth without Marshall, and Robin faints at the sight of the birth. Marshall arrives just in time for his son to be born, whom Lily names after Marshall's late father and honors Barney's condition, and everyone welcomes Marvin Wait-for-It Eriksen into the world.

Part 2

Part 2 begins with a flashforward to Barney's wedding, where Lily tells Ted that the bride wants to see him, mirroring the ending of "The Best Man."

After the birth of Marshall and Lily's son, Ted and Robin reconcile as friends. Robin tells Ted that all the women he has pursued in the past were the wrong person, with Victoria being the only exception. She convinces Ted to call Victoria; Ted eventually asks Victoria to meet him at MacLaren's, hoping to find out if she ever got engaged. She arrives in a wedding dress and asks him to run away with her, as she has never stopped thinking about him. He agrees and gets in the car with her, but Ted admits he cannot let Victoria leave her fiance at the altar after what Stella did to him. He tells Victoria that he is taking her back to the church so that she can go through with her wedding. Ted begins reminiscing about their past relationship and drives past the church, the two hold hands as they drive off into the sunset together.

Marshall and Lily appoint Robin to take the photograph for baby Marvin's birth announcement, but she can't take a decent shot of the family together. Eventually the two fall asleep on their bed with Marvin between them, allowing Robin to get a perfect shot.

Barney returns to Quinn to find that she has re-decorated the apartment bright pink as an act of revenge for his leaving town after their fight, but Barney is glad she had not left him and the two make up. On the way to Hawaii, Barney is stopped at airport security because of a mysterious box he has placed in his luggage, the contents of which he claims he cannot reveal due to "the Magician's Code". He and Quinn are taken in for questioning, where she reveals that she has quit her job for Barney and is now unemployed. After missing their flight, Quinn is ready to leave, forcing Barney to perform the trick contained within the box, which turns out to contain an engagement ring. He proposes to Quinn and she accepts. They return to Marshall and Lily's apartment to announce their engagement. As Quinn leaves the room to tell the story of the proposal, Barney asks Robin if she is okay with everything. Robin says that she knows how awesome he is, and that she is happy for him.

The episode closes with a flash-forward to Barney's wedding. Ted and Marshall stand in a hallway, with Marshall talking about how everything turned out for them. Ted enters a room where the bride is located, when the bride turns to face Ted, it is revealed to be Robin.


In an interview published after "The Magician's Code" originally aired, show co-creator Craig Thomas admitted that Barney's bride "had to be [Robin]", and it was decided, "literally years ago," that the two of them would get married after they originally broke up in season 5.[4] As for Lily and Marshall's baby's middle name, "Wait-for-It", Thomas said, "How often do you tell someone your middle name? ... Middle names aren't that useful and why not?".[4]


The season finale was viewed by 8.49 million viewers.[5]

Donna Bowman of The A.V. Club graded the episode at B, stating that much happened in the episode even if there were contradictions along the way while the outcomes of certain events are attempts at misdirection.[6]

Entertainment Weekly's Michelle Profis stated the episode does not leave anything for the audience to contemplate before the next season but left some emotional moments such as the baby being named after Marshall's father.[7]

Ethan Alter of Television Without Pity gave part one a C+ and part two a C-. He referred to the episode as a "fake clip show" where "the fake clips here were funnier than anything else in the episode", and remarked that the show could have revealed Robin as Barney's bride with equal impact in the season premiere, thereby making the entire season redundant.[8][9]


  1. ^ Michael Ausiello (March 20, 2012). "Ask Ausiello: Spoilers on House, Fringe, Castle, HIMYM, NCIS, Grey's, The Killing and More!". Retrieved March 29, 2012. 
  2. ^ "Shows A-Z - how i met your mother on cbs". Retrieved April 1, 2012. 
  3. ^ Matt Richenthal (March 22, 2012). "CBS Reveals Season Finale Dates, Details". Retrieved March 29, 2012. 
  4. ^ a b Joyce Eng (May 15, 2012). "How I Met Your Mother Boss on Barney's Bride: "It Had to Be Her"". TV Guide. Retrieved May 19, 2012. 
  5. ^ "Ratings News - 15th May 2012". SpoilerTV. Retrieved May 27, 2012. 
  6. ^ Donna Bowman (May 14, 2012). "How I Met Your Mother: "The Magician's Code"". The A.V. Club. Retrieved June 30, 2014. 
  7. ^ Michelle Profis (May 15, 2012). "'How I Met Your Mother' finale recap: The Magician's Code". Retrieved June 30, 2014. 
  8. ^ Ethan Alter. "How I Met Your Mother TV Show - Storytime at the Apollo". Retrieved June 30, 2014. 
  9. ^ Ethan Alter. "How I Met Your Mother TV Show - Mawage Is Wot Bwings Us Togeder Tooday". Retrieved June 30, 2014. 

External links[edit]