Four years ago, my old college dorm neighbor, Brian Acton, was looking for a job. Up until that point, he had spent 11 years at Yahoo in a variety of engineering jobs.

He landed an interview with Twitter — but they didn’t give him an offer.

He interviewed with Facebook — and they too did not give him a job offer.

I didn’t know Brian all that well back in school. We would say “hi” in the hallways and we had several friends in common. He was a nice guy, one of many computer-science-type majors on campus, and seemed socially relatively conservative. My guess is, if he had landed an offer from Twitter or Facebook 4 years ago when those firms were hot in Silicon Valley, he would have taken it.

But, that did not happen.

Sometimes, in life and in one’s career when a door to an opportunity closes, a window to another opportunity opens.

As the late Steve Jobs said (I’m paraphrasing), in the moment it is hard to see how a particular moment in your life makes sense. But looking back many years later, you’ll often be able to connect the dots and see how everything you went through was critical in leading you to the place you are now.

It turns out this was the case for Brian.

With no great job offers in hand, he and a former Yahoo colleague started a company called WhatsApp.

You may have seen WhatsApp in the news over the last few days. That’s because Facebook announced that it would be acquiring the company for $19 BILLION dollars.

That is billion with a “B”.

(The company has no revenues and only 55 employees… but is poised to exceed 1 billion users for its messaging application — a milestone only matched by the likes of Google, Facebook, Skype, and Yahoo.)

Forbes estimates Brian’s net worth at $3 billion. He will now become an employee of Facebook — the same firm that rejected him 4 years ago.

Among Silicon Valley recruiters, his name is becoming a catchphrase. As in, “hire this person, because if you don’t, she’ll be your Brian Acton — and it’ll cost you $3 billion to hire her later.”

While there is a natural appeal for showing up someone who rejected you before, the perspective I want to share is to take anything you perceive as a career “failure” with a grain of salt.

It’s easy to focus on what you do not have and lose sight of what you do have. In Brian’s case, he didn’t land the job offers he wanted, but he did have an opportunity to work with a colleague in building a new startup.

Arguably, getting rejected by Twitter and Facebook was the best thing that could have happened to him.

My own career has had numerous failures and setbacks (of which someday I will share with you, but for the moment am way too embarrassed to do so) and with the perspective of time, those failures were critical to getting me to a place in my life and career today that I very much value.

(But boy, were some of those failures extremely, extremely painful.)

Sometimes, the failure would send me in a new direction because the original direction was a dead end. Other times, I needed to learn an important lesson and the failure was the “tuition” paid to learn that lesson — a lesson that would be wildly valuable 5 to 7 years later.

If you happen to be going through a period of rejection, defeat, or a setback in your career, try to remember that it is not the end of the world. Focus on the many opportunities that remain, not the one that is now gone.

If you have not had a major setback in your career, which may be the case especially if you are only in your first few years out of school, try to not judge harshly those who have “failed.” Consider being compassionate — someday, that person could be you.

Sometimes it is easy to fall into the trap of looking down, thinking less of those who have accomplished less than you. It is a faux way of feeling better about oneself — but doing so is both short-lived and at someone else’s expense.

Failure is a part of life. That’s especially the case if you set big goals. The bigger the goal, the more likely setbacks are to occur. The easiest way to never fail is to never try anything of significance.

I’ll bet Brian Acton was glad he didn’t let his rejection from Twitter and Facebook hold him back. And just in case he forgets, he has 3 billion reminders to help him remember that lesson.