The Broken Code

HIMYM episode 9x04 (188)

103584 D0310b
First aired:
October 7, 2013
Pamela Fryman
Matthew Kuhn
Barney's Blog

Images (10)

While Barney works through his anger at Ted after finding out he still has feelings for Robin, Marshall Skypes in to act as a judge and help settle their dispute. Meanwhile, Lily realizes she is Robin’s only girlfriend.


Picking up from the previous episode on Friday at 3:00 PM, (51 hours before the wedding), Barney confronts Ted over his meeting with Robin at the Central Park Carousel, specifically the tender moment Ted had shared with her by holding her hand. Ted explains he was only there to comfort Robin as a friend, and Barney seemingly accepts this.

Lily has improved her Marshpillow to incorporate a tablet with Marshall communicating through video chat while he is en route to Farhampton. Robin is impressed with it, but wishes Lily had put more time in putting together her bachelorette party, in which no one but Patrice had showed up (much to Robin's anger). Lily apologizes, saying she was too busy planning the move to Rome, but later reveals the reason no-one came was because Robin doesn't seem to have any girlfriends. Robin admits she has trouble connecting with other women, and Lily decides Robin needs to have at least one other female friend while she is away in Rome for a year. Lily has Robin try to befriend women at the hotel bar, and eventually hits it off with someone who shares her love for hockey. Lily then imagines that they are both hanging out at Barney and Robin's apartment and Robin suggests that they start sleeping together, as friends and not unfaithful to their marriages (confirming Lily's bisexuality). Lily is immediately jealous and drives her away, and two decide they'll be fine as long as they have each other, seemingly ignoring the fact that Lily and Marshall are moving to Rome for a year.

As Ted boasts about being the best man, including planning a poker game for Barney and handwriting the table cards for the reception in calligraphy, Barney informs Ted he accidentally forgot the cards, which Ted promptly agrees to remake. As part of Ted's best man duties, Barney also asks Ted to move from his current room to the basement to make room for a relative, and to house the cages for doves to be used at the wedding. When delivering the cards to Barney (after having to correct them again), Ted realizes Barney is mad at him for holding hands with Robin. Barney has chosen William Zabka to be the best man, who, along with Tim Gunn, and Ranjit have already started the poker game. Barney claims Ted's actions go against the Bro Code, which Ted disagrees.

Unable to decide who is correct, the two request Marshall (via video chat) to weigh in. Marshall asks the two to recreate the events, with Ted asked to hold Barney's hand and offer comfort, and see if it feels weird or not. Ted admits he still sometimes has feelings for Robin, but promises Barney he won't do anything to get between them and that he will try to let those feelings go. Barney forgives Ted and during a poker game, Barney reinstates him as the best man, much to Zabka's evident displeasure.

This page or section uses Creative Commons Licensed content from Wikipedia's The Broken Coke (How I Met Your Mother) article. (view authors).

You can contribute to the How I Met Your Mother Wiki by rewriting the copied content.



  • Lily's Marshpillow was previously seen in Desperation Day​​.
  • Ted taking calligraphy classes was previously mentioned in Twin Beds.
  • Barney has teased Ted about sleeping with his mom in previous episodes.
  • Barney has broken the Bro Code when he slept with Robin as was revealed in The Goat.
  • Robin has previously mentioned that she was raised as a boy. This was first mentioned in Happily Ever After​​.
  • Lily says "I will cut you!" in this episode.  She has said this before in Band or DJ?.
  • Ted and Robin had a discussion about Ted shutting down his feelings for Robin using an "off-switch" soon after they met in Purple Giraffe​​.
  • William Zabka was first seen in The Bro Mitzvah.
  • Ted mentions Barney was in a laser tag fight; this occurred during Something Old.  Barney has also expressed his love for laser tag in the past.
  • Lily decided to take a page out of The Playbook by having Robin try to connect with Amanda who was crying at the bar. Barney attempted to do something similar in the beginning of Subway Wars.
  • Lily fears that Robin and Amanda will become best friends and will develop a sexual relationship. Lily's attraction to Robin has been shown in previous episodes (see Lily's Bisexuality).
  • Marshall uses "E-Lawyered" since he's only virtually present.
  • Barney and Ted are on the ground holding hands in the same way as Ted and Robin had previously sat in Something Old. As soon as Ted and Barney start talking about Ted's actual feelings for Robin, it begins raining heavily, just as it had in the previous season with Ted and Robin.
  • In Showdown​​, Lily gets called a bitch after saying she "lost all this weight without even trying." Similarly, when Robin talks about her spontaneous weight loss Lily starts seething.

Future References (Contains Spoilers)

  • The poker game for the groomsman will be the focal point of The Poker Game.
  • Barney will reveal what actually went on between him and Ted's mom in Unpause.


  • "I saw you and Robin at the Carousel"
  • Ted drops the $600 bottle of Scotch!
  • Barney went to Robin afterall only to witness Robin holding Ted's hand.
  • Robin initiated the hand holding. She grabbed his hand.
  • Whatup!
  • Ted and Barney cry over broken Scotch.
  • Marshpillow
  • Testing if it's 'weird'
For a listing of all images on the wiki tagged as being from this episode, see Category: The Broken Code images.

Memorable Quotes

Future Ted: Kids, it was two days before Barney and Robin's wedding and everything was going off without a hitch.
Ted: *Ted enters* Ah, been waiting for the perfect time for this and my friend that time is--
Barney: I saw you and Robin at the carousel.
Future Ted: Okay there was one slight hitch.

Barney: Wadup?
Ted: Nothing up! Everything down! All parts of me down!

Barney: You're my bestfriend, and my bestman. Of course I trust you.
Ted: *cries*
Barney: Oh come on, you don't have to cry about it.
Ted: It's not that. That was a $600 bottle of scotch!
Barney: Oh my ggg---- *starts crying too*

Marshall: Hey Ted, can you give me a gander of the environs--
Ted: *swings Marshpillow's head*
Marshall: Wow, this place looks beautif--
Barney: Wait for it..
Ted: He's frozen.
Lily: Ugh, same thing happened last night at the worst possible time! I just got on all fours and taken off my panti--
Robin: Now Lily's frozen!

Broses: Article 1! Bros before ho's!

Christopher Brolumbus: Article 62! A bro who calls dibs first has dibs! Ohhhh, dibs!

Marshall: Now, although not expressly stated in the Bro Code, a weird moment between a bro and his bro's fiance, is, in my bro-pinion, a violation. However, Ted was helping Robin as a friend. Therefore, holding her hand isn't necessarily a weird moment. That being said, if we decide that holding any friend's hand is weird then yes, Ted did break the Bro Code. So the question is this, if Ted had gone to the park and held Barney's hand, would it have been weird?

Barney: You still have feelings for Robin?
Ted: What? What! What....wha-okay yes sometimes I do!
Barney: Then turn them off!
Ted: I would love to! But it doesn't work that way! I'm a human being! I--I don't have an off switch!

Ted: Barney, I hate these feelings. I hate myself for having these feelings. No one would wish they would go away more than I do! But I just, I can't seem to make that happen!

Robin: See, that's why I only need you. You're a psycho. My psycho.

Lily: Just be yourself. Say something nice.
Robin: Which one? I can't do both.

Notes and Trivia

Goofs and Errors

  • For the final poker hand Barney folds, then Ted, William Zabka, and Tim Gunn fold. Then Ranjit raises, and Marshall goes all in. This is incorrect. Poker players always act 'in turn' going clockwise around the table. Based on the dialog Marshall had to make a raise (before the scene starts), then Barney and the other players folded, Ranjit thought he had the best hand and re-raised Marshall, and then Marshall went all in.
  • Barney mentions that Ted and Robin holding hands is the 4th grade equivalent to "banging" and then says in Ted's case it would be 12th grade even though Ted lost his virginity in high school whereas Barney lost his when he was 23.
  • Lily says that Robin doesn't have any girls, but after Robin reconciled with Jessica Glitter in Glitter Lily probably should've thought to invite her to Robin's bachelorette party.
  • Robin and Amanda bond over their hatred of the Boston Bruins. The actual game took place on May 16, 2013 (a week before this episode takes place) where the Bruins beat the New York Rangers 3-2.
  • When Ted and Robin are shown holding hands in the rain, it's nighttime already but in Something Old it was daytime.
  • Once the rain sets in on the beach scene, the microphone gets wet and affects the audio quality. You're able to see Barney's microphone under his white shirt in several shots where it's wet.
  • In the Pilot, Robin has three friends waiting for her at the bar, while Robin is throwing the drink at Ted's face, but in this episode, Lily says that Robin has no friends. However it can be assumed that Robin is no longer in contact with these friends 8 years later.

Allusions and Outside References

  • This episode's name is a reference to The Bro Code.
  • Marshall mentions Weekend at Bernie's. The final scene with Barney, Ted, and Marshpillow in their bathing suits watching women go by is another reference to Weekend at Bernie's.
  • When Robin sees a woman at the bar wearing tennis shoes, she alludes to the filibuster by Texas Senator Wendy Davis.
  • When Ted complains about William Zabka wearing the best man hat, Barney says "He's the best around." This is a reference to the song played during the final fight of The Karate Kid, "You're the Best."
  • Lily and Ted making jokes with the pronunciation of the car rental company Hertz, which is pronounced 'hurts' in English.
  • Barney states that the Bro Code is now also available in airlines throughout the US and at Lufthansa which is a German airline because Der Bro Code is quite big in Germany.
  • Barney's made up history lessons refer to Moses and the 10 Commandments, Christopher Columbus discovering America, and Pocahontas, whereby Barney mixes data and time a lot: Columbus discovered America in 1492 so he could not sail in 1776 and also Pocahontas was dead by that time (1617).
  • Robin tells Lily that she had been dressing up Marshpillow like Malibu Ken, Barbie's lover boy doll.
  • Robin's deep-seated hatred for the Boston Bruins is likely due to the Vancouver Canucks losing to the Boston Bruins during the Stanley Cup Playoffs in 2011, one of the most heart-wrenching games for Canucks fans like herself.


Simple Minds - Waterfront

Other Notes

  • The Bro Code that Barney shows to Ted is the actual version released commercially in real life, and looks different from Barney's personal copies from earlier episodes.
  • The end credits state "matt kuhn, author of 'the bro code,' writes for this program. published by a division of simon & schuster, a cbs company."
  • Barney mentions that there's an article in the Bro Code that says "A bro shall not have a weird moment with another bro's fiancee," though he is unable to find it.
  • Article 104 does say "mom of a bro is always off-limits," as Ted says.
  • When Robin hears Patrice's voice in her bachelorette party, she makes her dangerous face described in Robin 101.
  • Cristin Milioti is now the second person to be credited in an episode in which they do not appear; the first was Alyson Hannigan.



Featuring Matt Kuhn.


  • Donna Bowman of the A.V. Club gave the episode a B-.[1]
  • Max Nicholson of IGN gave the episode a 7 out of 10.[2]
  • Angel Cohn of Television Without Pity gave the episode a C-.[3]
  • The St. Petersburg Comic Review gave this episode 8 out of 10 stars. "...another bottle of Scotch down..."


External Links

Previous episode
Last Time in New York
The Broken Code
(all episodes)
Next episode →
The Poker Game

Start a Discussion Discussions about The Broken Code

  • "The Broken Code" Discussion Thread

    33 messages
    • No not being the same like Robin - to have a connection at a point is not being the same, for example the friend I have, ("raised lik...
    • I hear what you are saying Peschanie. We know that Robin is close to Teds' kids and in order for her to be that close she will have to...
  • The Broken Code

    69 messages
    • Elytum wrote:Jack, Valejac said "Elytum............ come ooooon (and I am not quoting Ted XD)" so at first, I felt oblige to quote ...
    • Okay this new structure just got annoying. Super slow and boring plot line and NO MOTHER ? ARRRGG #maybeanotherweek