Jan Koum, an immigrant from Ukraine, was so poor as a teenager that he used saved his old Soviet notebooks for school and queued with his mom for food stamps.
Brian Acton lost a small fortune in the dot-com bust and was rejected for jobs at Twitter and Facebook.
Now, the friends behind the hot mobile messaging startup WhatsApp are the newest tech industry billionaires.
Facebook this week bought WhatsApp in a stock-and-cash deal worth up to $19 billion and gave Koum a seat on the social network's board of directors.
Koum signed the Facebook takeover contract at the unused building where he and his mother once queued for food stamps in the Silicon Valley city of Mountain View, where WhatsApp is located, according to Forbes Magazine.
Koum, who turns 38 on Sunday, has described growing up as a rebellious Jewish child near Kiev and having little when he immigrated to California at with his mother the age of 16 just after the Soviet Union's breakup.
His father did not make it to the United States, where the family sought to escape anti-Semitism and oppressive tactics of secret police.
"Jan's childhood made him appreciate communication that was not bugged or taped," Sequoia Capital partner Jim Goetz said in an online post.
"When he arrived in the US as a 16-year-old immigrant living on food stamps, he had the extra incentive of wanting to stay in touch with his family in Russia and the Ukraine."
Koum's mother brought with her a cache of pens and Soviet-issued notebooks to save money on school supplies, according to Forbes magazine.
A self-described trouble-maker at school, Koum had a job sweeping the floors in a grocery store. After his mother was diagnosed with cancer, they got by on disability payments, Forbes reported.
Koum learned computer networking from manuals bought from, and eventually returned to, a used book store, according to the account.
He enrolled in a state university in Silicon Valley and was working on the side with a computer security firm when he met Acton while on assignment at Yahoo in 1997.
Acton was employee number 44 at the Sunnyvale, California-based Internet firm and shared a "no-nonsense" attitude with Koum. Within a year, Koum was working as an engineer at Yahoo and the pair were on their way to being close friends.
Koum eventually chose Yahoo over college. When Koum's mother died of cancer in 2000, his mentor Acton stepped in with support.
Acton, meanwhile, reportedly lost millions investing during the famous dot-com boom that ended with an infamous dot-com bust.
Acton and Koum left Yahoo in 2007 and took a year off, exploring South America and playing the sport of Ultimate Frisbee, according to Forbes.
They both applied for jobs at Facebook after coming home. Both were rejected. In a Twitter post from 2009, Acton said that an effort to win a job at one-to-many messaging service Twitter was rebuffed.
Koum was living off dwindling savings when the iPhone and Apple's online App Store prompted a certainty that an exciting new frontier was opening.
He tapped into the local Russian immigrant community to pursue his idea of a smartphone messaging service synched to people's contact lists.
Koum enlisted Acton, who was jobless and devoting energy to a less promising startup.
Koum and Acton in 2009 founded WhatsApp, which took its name from a play on the phrase "What's Up?"
They devoted themselves to a credo of "No Ads. No Games. No Gimmicks."
A note stating just that and signed by Acton remains taped to Koum's desk, according to venture capital firm Sequoia, which invested in the startup early.
The "contrarian approach" of gathering no information about users for targeting ads was shaped by Koum's aversion to tactics of secret police in communist countries, Goetz said in an online note.
The formula led to stunning growth to more than 450 million users, with 50 billion messages handled daily
The founders jokingly described themselves at the website as "two guys who spent a combined 20 years doing geeky stuff at Yahoo!"
Koum describes himself in his Twitter account profile with a Kanye West quote, "We on a galaxy the haters cannot visit."
Koum has nearly 12,000 followers at Twitter but follows only "Jesus Christ, Silicon Valley," an account devoted to Internet industry humor.
In a conference call discussing the acquisition, Facebook chief and founder Mark Zuckerberg described Koum as being a "valuable thought partner" for several years.
WhatsApp is a platform for sending images, video, audio, or text messages for free over the Internet using data connections of smartphones.
Explore further: VMWare, Carahsoft pay $75.5M to settle overcharging claims