In the How I Met Your Mother episode "Robin 101" (S5E3), Barney enlists Ted to teach a detailed course on dating Robin, covering her unique habits, specific physical triggers, and emotional psychology. The episode, featuring a subplot about Marshall's old barrel, concludes with a romantic, albeit unorthodox, understanding between Barney and Robin. You can find a detailed recap of the episode on TV Tropes or a full summary on the How I Met Your Mother Wiki .
Watch these clips to see Ted's classroom lessons and Robin's unique ways of expressing her feelings: [S5E3] Robin 101