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 actors

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

Season 7 episodes

"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[edit]

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[edit]

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 finally reconcile as friends again. Robin bluntly 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. Though he initially agrees and gets in the car with her, some further thought causes Ted to admit 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. However, as they near the church Ted begins reminiscing about their past relationship (specifically, the moments he let her walk away) and drives past it. When Victoria tells Ted that he has driven past the church, Ted says that he knows, indicating that he has willingly changed his mind, the two passionately 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 (with the only good photo emerging being when they take the baby down to MacLaren's to give advice to Ted, and the two are horrified when they realize their son's first outing was to a bar). Eventually the two fall asleep on their bed with Marvin between them, allowing Robin to get a perfect, if unconventional, shot.

Barney returns to Quinn to find that she has completely re-decorated the apartment bright pink as an act of revenge for his leaving town suddenly after their fight, but Barney is only glad she had not left him and the two quickly 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 then 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]


Part 1: "You Were Born" by Cloud Cult

Part 2: "The Wind" by Cat Stevens

Barney's blog[edit]

Barney gives away a magic trick that can be used to impress and pick up women.[5]

In a second entry, he talks about the origin of several rules of conduct.[6]

Cultural references[edit]

  • In Robin's recollection of the "Cuban sandwich crisis," she notes Ted as looking like "Joe Frazier after the Thrilla in Manila".
  • Robin claims she spent some private time with Neil Young at her bedroom in Ted's apartment, though Barney tells her it was not who she thought it was.
  • While extremely drunk, Marshall speaks like Yoda and imagines an ATM screen as actually showing scenes from the 1986 video game The Legend of Zelda.
  • Ted reminds Lily of the gang trick-or-treating on Halloween as characters from the The Breakfast Club, but a failure at coordination causes them all to dress as John Bender.
  • Barney tries to pick up women as the Terminator. He wonders why he is unable to pick up any women in biker attire and later tries doing it nude, impersonating Arnold Schwarzenegger's voice.
  • When Barney returns home, Quinn states that his bedroom was too "American Psycho." This is a reference to the novel by Brett Easton Ellis in which the main character tries to maintain an apartment design similar to Barney's.
  • When Barney performs the magic trick, part of his performance is spoken backwards, which is how the DC Comics sorceress Zatanna speaks her incantations.


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

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.[8]

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.[9]

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.[10][11]


  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. ^ "Barney's Blog: The Great Barndini". May 15, 2012. 
  6. ^ "Barney's Blog: Interrogation Room, Sweet Interrogation Room". May 15, 2012. 
  7. ^ "Ratings News - 15th May 2012". SpoilerTV. Retrieved May 27, 2012. 
  8. ^ Donna Bowman (May 14, 2012). "How I Met Your Mother: "The Magician’s Code"". The A.V. Club. Retrieved June 30, 2014. 
  9. ^ Michelle Profis (May 15, 2012). "'How I Met Your Mother' finale recap: The Magician's Code". Retrieved June 30, 2014. 
  10. ^ Ethan Alter. "How I Met Your Mother TV Show - Storytime at the Apollo". Retrieved June 30, 2014. 
  11. ^ Ethan Alter. "How I Met Your Mother TV Show - Mawage Is Wot Bwings Us Togeder Tooday". Retrieved June 30, 2014. 

External links[edit]