Ali and Hadi Partovi may not be household names, but the twins have quietly helped launch some of Silicon Valley's biggest startups of recent vintage.

Hadi co-founded Tellme Networks, which Microsoft bought for a reported $800 million. Ali co-founded Internet advertising pioneer LinkExchange, which Microsoft bought for $265 million; he later became one of the first investors in Zappos, the online shoe retailer launched by LinkExchange co-founder Tony Hsieh. Amazon bought that one for about $850 million.

The Partovis also snapped up early stakes in Dropbox and Facebook. And while they're both still active angel investors, they've gotten increasingly involved in philanthropic work, including founding Code.org. The nonprofit, which encourages kids to learn software development, made a splash last year with a video that featured tech celebrities such as Mark Zuckerberg, Jack Dorsey and Bill Gates.

The brothers recently spoke with this newspaper about doing well while doing good. Here's an edited transcript.

Q Your family fled Iran during the revolution?

HADI: Five years later, in 1984. Our father had co-founded Sharif University, the top tech university in the Middle East.

ALI: And our mom actually had been a computer scientist who had studied at Boston University, but in post-revolution Iran she had to give up her career. It was a hard place to be; we lived close to the main TV station, so every other evening there'd be bombing attacks, and we were in the basement holding our ears.

HADI: Then when we got to the States, our family had to split up, because Dad got a job at MIT and our mom wanted us to stay close to family in Tarrytown, N.Y. Our parents worked three different jobs in two different cities to stay afloat.

Q You both ended up at Harvard and majored in computer science. Ali, how'd you come to start LinkExchange in 1996?

ALI: I was 23, a year and a half out of school. Tony and Hadi had been on the computer programming team in college, which I thought was too nerdy. Then Tony tried to get Hadi to join his startup, and Hadi at the time had a high-profile position as part of Microsoft's top team for Internet strategy. He said, "I can't leave, but here's my brother."

Q And after LinkExchange was bought in 1998, Hadi left Microsoft to start Tellme. Did he want to emulate your success?

ALI: We consciously viewed our careers as helping each other; I think we were both motivated by wanting to take care of our parents. Hadi was in a safe job, so I could do a very risky venture. And then once LinkExchange was acquired, I stayed at Microsoft while he went to do his venture.

Q Was it coincidence that both companies were sold to Microsoft?

HADI: When I was certain that Netscape was going to buy LinkExchange, I went right to (Microsoft president) Steve Ballmer and said, "I haven't talked to you about my brother's company before, but they're about to get acquired, and I've spent the last five years competing with Netscape."

Then, after the Tellme acquisition (in 2007), somebody on the Microsoft board told Ballmer, "Next time you talk with Hadi, don't take your wallet."

Q You guys started jointly investing in startups after LinkExchange was sold, and you hooked up with Facebook in 2005, when they were on fewer than 100 college campuses. How did that introduction come about?

ALI: The thread started with LinkExchange, which had two really talented guys: Scott Banister (who later co-founded IronPort) and Max Levchin. Scott convinced Max to start PayPal, and because of that, we were connected to the whole PayPal Mafia.

Plus, LinkExchange's main investor and board member was Mike Moritz at Sequoia Capital, and through that Hadi was connected to Sean Parker. Sean invited Hadi to meet Facebook. I remember thinking, "It seems cool, but are you sure you don't just want to join a fraternity?" It was like eight college-age guys.

Q That story sure illustrates the power of relationships in the valley.

ALI: Our investing path has been following good people. We backed a company called EduSoft (which helps school districts track student performance). After it was acquired, we told the entrepreneurs, "Whatever you do next, we want in." One of them was Dan Yates, who co-founded oPower. (The company, which helps big utilities promote energy efficiency, filed this month for a $100 million IPO.)

The other EduSoft founder, Jay Kimmelman, started a company to run for-profit schools for low-income children in Kenya. Today it's the largest employer in Kenya and the largest chain of schools, I think, in the world.

Q How much of the investing you do these days is about a social return versus a financial return?

ALI: We're not looking for a social impact as an investment thesis. But if a company has a for-profit model that also has a social impact, we like that, for two reasons. One, it feels good, and two, other people will want it to succeed.

HADI: Just today I read about a company that's a cross between Flappy Bird and Snapchat. When those are the startups out there, it's not nearly as inspirational as trying to solve the world's energy problems.

ALI: It's much more motivating to figure out how to make your impact and your profit in one effort.

Q Then why do Code.org as a nonprofit?

HADI: I get asked that all the time. There's lots of companies going the for-profit route in teaching computer science, but they don't look much at how to improve public schools, the neediest schools that have no resources. We've gotten the president of the United States involved, we've gotten Mark Zuckerberg doing lectures for us, we've gotten this on the homepage of Google. A for-profit company couldn't do any of those things.

Q Do you think you'll be running this for the rest of your career?

HADI: I hope we're going to solve the problem well before that. I'm pretty committed until we're at the point that computer science is in every school in the country. I sure hope I'm not working 60- to 70-hour weeks three or four years from now

Q That actually sounds optimistic.

HADI: The 20-hour programming course that we launched 12 weeks ago is in 13,000 classrooms today. We started this a year ago with a one-hour course, which went to 35,000 classrooms. There's about 140,000 schools in this country, so it's gone from 10 percent to 20 percent in our first year.

We've now reached 25 million kids, and the entire Hour of Code cost $1.2 million. That's 5 cents a child

ALI: It's so easy to get people to support this because they're like, "Oh yeah, it's incredibly needed."

HADI: We moved to this country when we were 11, and I'd say we're in many ways the poster children for how immigrants create jobs. Being good at computer programming was a direct path to our success.

Why should people who study in India or China or Russia be equipped with more employable skills than people in the United States? Why should the American dream be more accessible for non-Americans?

Contact Peter Delevett at 408-271-3638. Follow him at Twitter.com/mercwiretap.

ALI PARTOVI
Age: 41
Born: Tehran, Iran
Lives: Piedmont
Education: Bachelor's and master's degrees in computer science, Harvard University
Current job: Angel investor
Previous jobs: Co-founder: LinkExchange, iLike and Code.org
Family: Divorced, three kids

HADI PARTOVI
Age: 41
Born: Tehran, Iran
Lives: Bellevue, Wash.
Education: Bachelor's and master's degrees in computer science, Harvard University
Current job: CEO and co-founder, Code.org
Previous jobs: Co-founder, Tellme Networks and iLike.
Family: Married, three kids

five things about the partovi twins
They're avid musicians and grew up playing piano duets together.
Ali enjoys rock climbing at a gym every week; Hadi has climbed Mount Rainier.
Ali's youngest child is the same age as Hadi's oldest.
The twins drive matching, colorful VW Beetles that are replicas of the "shagadelic" Austin Powers Bug.
Ali is left-handed and Hadi is right-handed.