His Mask
When Barney was hit by that bus, it was the first time Ted realized his friend wasn't invincible. Up until then he always saw Barney as some kind of a cartoon character, who's whole point in life was to keep his friends entertained on their nights out, by sleeping around and later tell them his ridiculous stories. Nothing ever got to him.
When he learned about Barney's and Robin's night together, he was so mad, that it erased any doubt he ever had about Barney's having feelings. He truly was insensitive emotionless asswhole, and proved once and for all that his friends meant nothing to him.
But it was when he saw him in that hospital bed, his whole body broken; that he realized how much he was broken on the inside as well. He had never seen Barney cry before, but that day he saw a few tears running down his face. He was in pain, physically and emotionally, and Ted was disappointed with himself that it took him six years to finally see through Barney's mask.
It was a beginning of something new, with a single crack in that mask of his. But he got it on as soon as he got out of the hospital, and Ted thought that maybe he has it all wrong.
Then a year later, Barney did the one thing everyone was sure he would never do. He entered a serious relationship with no other than Ted ex-girlfriend, Robin. And after a few months, Ted noticed a new crack in the image of fake invincible awesomeness that Barney claimed to be. Barney and Robin had so many fights they couldn't keep track on, that eventually Barney started to crack. He gained weight, replacing alcohol with food, stopped playing lasertag, and basically stopped doing anything that was Barney.
As much as Ted hated seeing his friend suffering, he thought that maybe Barney would finally drop the act and allow himself to be a real human being, and deal with his emotions. But then they broke up and not a minute later did he return to his old self, putting the mask back on, with straps of sellotape covering the cracks.
By the time Barney got to meet his father, Ted knew better and predicted his friend's breakdown. He knew Barney's anger was building up inside him, and after years of not dealing with his issues, they were bound to come out eventually. He was there for him, because by then he knew how much Barney needed his friends, and after ten years of friendship, he owed him that much.
The next crack came as a surprise to Ted, because no matter how much he thought he knew his friend, he would never have believed it if someone told him of it. But he saw it in his own eyes. He saw Barney in their apartment, in Robin's room, clearing it from roses and candles, and he knew. He knew right then that all he ever thought of Barney was a lie. He was capable of having feelings. He was capable of falling in love. And he was capable of having a broken heart. Because no matter how much he thought he knew Barney, the look of hurt in his eyes couldn't be misplaced. He was hurting, and it almost broke the mask completely. Almost.
Because a day later he was back to normal, only this time the glue wasn't good enough, he had to hold the mask over his face, making adjustments when it threatened to fall apart.
Ted had never seen someone trying to fool himself for so long. For years Banrey had that mask on, fooling himself and the rest of them that he was somehow above everyone and everything else. Fooling everyone to believe that nothing could ever hurt him, that whenever he was feeling sad he stopped feeling sad and be awesome instead. He was even fooling Ted, at first, but Ted didn't buy it anymore.
Barney Stinson was just like the rest of them, wanting all the things they wanted in life, but for some reason he insisted on denying it.
And Ted was determined to break the mask once and for all and show Barney that he didn't need it anymore. So when Barney made him swear not to tell Robin, he had to tell her, and give her a chance to go up on that roof, take the mask off Barney's face and crash it to pieces. What he didn't expect though, was for Barney to take it off himself, and finally let himself be happy and go for what he wants.
And the day he saw his two best friends marrying each other, he was finally watching the real face of Barney, and it was the most awesome thing he ever got to see. Because the smile he had on his face, and the glee in his eyes were so much better and more beautiful than any mask anyone could ever make.
