How I Met Your Mother (2005–2014)
4 user 6 critic

The Broken Code 

Barney gives Ted's Best Man duties to The Karate Kid's William Zabka over the incident at the carousel, and Lily gives Robin a lousy bridal party.


Pamela Fryman


Carter Bays (created by), Craig Thomas (created by) | 2 more credits »




Episode complete credited cast:
Josh Radnor ... Ted Mosby
Jason Segel ... Marshall Eriksen
Cobie Smulders ... Robin Scherbatsky
Cristin Milioti ... Tracy McConnell (credit only)
Neil Patrick Harris ... Barney Stinson
Alyson Hannigan ... Lily Aldrin
Marshall Manesh ... Ranjit
Tim Gunn ... Tim Gunn
William Zabka ... Billy Zabka
Ellen D. Williams ... Patrice
Melissa Tang ... Amanda
Robert Belushi ... Linus
Cate Scott Campbell ... Lisa
Di Koob ... Lauren


Lily and Ted are carrying out their respective matron of honor and best man duties. Lily seems to be lax on carrying out her duties by forgetting to hit the send button on Robin's bridal shower evite. But Lily admits that the shower was a bit of a bust for another reason. Lily and Robin try to overcome that problem. On the other hand, Ted is doing whatever he can to be the best best man ever by accommodating Barney's every whim. But there is one thing that Ted may not be able to do for Barney, and that is not to have held Robin's hand at the carousel in the park, which Barney saw. Marshall the lawyer, who, although still on the road with Daphne, is present with the gang in a half stuffed man/half electronic state, ends up being the judge on the Barney/Ted issue. Written by Huggo

Plot Summary | Plot Synopsis


Comedy | Romance


TV-14 | See all certifications »






Release Date:

7 October 2013 (USA) See more »

Company Credits

Show more on IMDbPro »

Technical Specs


Sound Mix:




Aspect Ratio:

16:9 HD
See full technical specs »

Did You Know?


Barney's suit is Moods Of Norway See more »


Ted said that Pocahontas was with John Smith, but she actually married John Rolfe. See more »


Marshall Eriksen: 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?
See more »


References The Karate Kid (1984) See more »


Hey Beautiful
Written by The Solids
Performed by The Solids
See more »

Frequently Asked Questions

This FAQ is empty. Add the first question.

User Reviews

Solid Episode, But Not Very Funny
25 March 2015 | by slightlymad22See all my reviews

For some explicable reason the TV channel I'm watching the reruns on, skipped the last episode, and went straight on to this one!! I hate it when it does that!!

So now I'm watching "The broken" code" without seeing the build up to the scene at the end of the last episode which starts this one!! And it was a big important one!'

Plot In A Paragraph: Barney tells Ted he seen him and Robin holding hands at the Carousel in Central Park. Accusing Ted of breaking The Bro Code, he is so upset he strips Ted of his best man duties. Lily upgrades Marshpillow, who ends up in the argument with Ted and Barney, and Robin realises she has no female friends except Lily.

No Cristin Milioti in this episode, which is a disappointment, there were only a few laughs to be had, but it was a solid episode. Which hopefully put an end to the Ted/Robin/Barney love triangle.

1 of 2 people found this review helpful.  Was this review helpful to you? | Report this
Review this title | See all 4 user reviews »

Contribute to This Page

Free Movies and TV Shows You Can Watch Now

On IMDb TV, you can catch Hollywood hits and popular TV series at no cost. Select any poster below to play the movie, totally free!

Browse free movies and TV series

Stream Trending TV Series With Prime Video

Explore popular and recently added TV series available to stream now with Prime Video.

Start your free trial

Recently Viewed