In what may be headline news for most parents—a teenager is hanging out in his bedroom with his dad. They’re listening to music, like they often do. The 17-year-old son, Rohan Wadhwani, wants to know what his dad thinks about his new CD, "Skyline Lounge," an electronic pop soundtrack you might hear in a new-age bar. Wadhwani's father gives it a thumbs-up. As the two continue to chill, the younger Wadhwani isn’t done with his questions. Rohan, it turns out, has a dilemma in his love life—he has a girlfriend, but now there is this other girl he kind of likes, too. What should he do? Can he date both?

Some friends, especially if they're teenage boys, might say go for it. But Sunil Wadhwani isn't a teenage friend, he is a father, and his answer is filled with parental advice:

I know you might think how cool it would be to date two girls. But you should take into account what your conscience is telling you. What did your girlfriend do to deserve this? Whenever you make a decision, you should put yourself in the other person's position, and your decision should be to do what you believe is right, even if it isn’t what benefits you the most or is the easiest choice.

Few would argue with such advice, in a sense it’s universal, but how many people really follow it? Even Wadhwani, throughout his own life, has been forced to make some tough decisions, some when he was just a few years older than his son is now. Wadhwani, at the age of 21, left his home in India to pursue his MBA at Carnegie Mellon, but, in doing so, he bucked the conventional wisdom of his family and friends, who thought his aspirations were too risky. He should study to become an engineer or at least pick a profession that would lead to a specific career track. For Wadhwani, though, he didn’t like the idea of reporting to someone else. He thought of himself as an aspiring entrepreneur, even if many of those he knew in India thought he was taking on too much of a gamble.

He followed his own advice, but there were times when that seemed like a mistake. In 1976, he earned his MBA, and, sure enough, a decade later, he wasn’t reporting to anyone, thanks to his startup company, Mastech. That was the good news. The bad news was that the company was on life support. He and his friend and partner, Ashok Trivedi, sat across from each other, sharing the same tiny desk in an 8 ft. x 8 ft. office, their knees sometimes banging into each other. They needed a cash infusion, but they couldn’t secure any investors for the Pittsburgh startup that wanted to help clients develop software applications for the new world of networked computers, a novel concept back in 1987. The Mastech partners had decided the company should focus on this emerging new market rather than going after IBM mainframe computer business like most of its competitors. Several times, the two struggling entrepreneurs called it quits—only to come in the next morning and resolve to hang in there for another month. Actually, there had been three founding partners, but the situation was so dire that one of the partners bailed out.

If that didn’t cause enough stress, Wadhwani was going through his own dating dilemma. He had met a young woman named Nita at a party in New York City. Pretty and smart, fluent in seven languages, she was from India, visiting her aunt in America. They went out the next weekend and really hit it off before she returned home. In those pre-Skype days, he couldn’t afford to make international calls, so he wrote to her. A few months later, he flew to her home in India to meet her parents, who instantly liked him. They imagined that an Indian-American businessman, boasting a master’s degree from Carnegie Mellon, must live an affluent life. If only he would become their son-in-law, they surely dreamed. And, to the delight of Nita’s parents, Wadhwani asked for her hand in marriage. She said, "Yes!"

Meanwhile, Wadhwani was afraid to tell her that, in reality, he was so broke there was no money even for a honeymoon. If she found out the truth, he feared he may no longer have a bride. He could try to make up an excuse, deceive her, and hope his company would turn around in the near future. But he didn’t do that. Swallowing hard, he told the woman of his dreams that Mastech was struggling and that he may be completely broke very soon. Nita didn't flinch, telling him, "We'll do whatever we have to do. Go for it!"

It's often said that what doesn't kill you makes you stronger. That goes double for a new marriage and a startup company. Nita—a 23-year-old who didn’t know a soul besides her new husband in a new country and couldn't drive at first—was holed up in a small apartment while her husband worked 18-hour days, seven days a week, to make Mastech viable. Wadhwani marveled at his wife's loyalty; it made him even more determined to make his business a success. Looking back, he believes his resolve not to be swept away by his struggles gave him experience in becoming a disciplined entrepreneur.

"I believe that too much money in a new company makes you soft," Wadhwani says. "I think we’ve created a whole generation of spoiled entrepreneurs in the Internet age—fancy offices, too much money. You don't learn from that." He believes those well-financed entrepreneurs sometimes don't tough it out once the going gets rough. "If you don’t have much money, you learn discipline. You learn focus. Although," he says with a laugh, "you don’t have to go to extremes like Ashok and I did, sharing one desk in a tiny office. Anytime one of us caught a cold, the other did also, instantly. That’s probably how we got our first clients—they must have felt sorry for us, listening to all the coughing and sneezing!"

A thin man with a genteel and relaxed manner, he sits in an office that affords a panoramic view of lush hillsides. In the corner sits a treadmill. "Given how rarely it's used, it's become more of an art object," he quips. His self-deprecating humor masks a drive that gets him out of bed at 4:30 a.m. "Sleep is over-rated," he says. That drive is one of the reasons that Mastech survived and was primed to take off in the 1990s, once the market for networked computer systems exploded. He and his partner had been right, after all, with their hunch not to tie their future to IBM mainframes. Within 10 years, Mastech's sales grew from zero to $500 million annually as it landed clients ranging from WalMart to Carnival Cruise Lines to General Electric. The company went public in 1996, a proud moment for the company’s founders. The Wadhwanis moved out of their cramped apartment and bought a suburban home. They had two children, a girl and a boy, Shalina and Rohan. Nita—who had acclimated to life in the United States—became a soccer mom. Life was good.

But Wadhwani tried not to lose his perspective because he remembered the hard times. Sure enough, Mastech hit another rough patch in the late 1990s as the growing Internet bubble changed everything. There was a new wave of information technology consulting firms that specialized in Internet applications and were growing rapidly, and Mastech had to move fast to keep up. The company invested more than $100 million—a huge amount of money for a company its size—in emerging technologies such as voice recognition, software for wireless devices, and advanced data analytics. The company’s focus shifted so dramatically that the two partners renamed it iGate. Investors loved the company’s strategy, and its market cap soon shot up over $3 billion.

Feeling good about life, Wadhwani one day asked his wife, "Would you still love me if I’m worth nothing?" Nita, as she had done once before, told him she would stand by him, for richer or poorer. "Thank God she said that," Wadhwani laughs, "because in the next few months the tech bubble burst, and we were soon worth next to nothing again!" As the demand for tech services collapsed, the folding of tech companies became commonplace. iGate was barely hanging on—selling or closing its money—losing technology businesses.

A good entrepreneur is nothing if not adaptable, especially when the economy is not robust. By 2002, Wadhwani felt the company had to change direction once more. His customers had become value-focused, and Wadhwani realized that outsourcing IT support would give his company’s clients the highest return on their IT investments.

iGate began to establish software development centers in places such as India, China, Canada, Australia, and Mexico. Good business move. The company now has 6,400 employees around the world who work with more than 100 clients, and, in its second quarter 2009 earnings report, it announced $46.8 million revenue from continuing operations. It looks like Wadhwani won’t have to ask his wife anytime soon if she will stand by him for richer or poorer.

But there is one byproduct of the company’s growth—the thorny national debate over U.S. jobs going overseas. Wadhwani is a voice not frequently heard in the news media or by critics who say that outsourcing steals American jobs, weakens the economy, and exploits workers in overseas sweatshops. He takes exception to those criticisms. "When you and I go into a WalMart to buy something, what do we look for? We look for the best value—the right quality at the best price. You don’t look at the label and say, 'Gee, this is made in Mexico. I'm going to put it back and find something that's made in the U.S., even if it costs more.' Companies do the same—they compete globally to provide the best value to their customers, and that means getting work done by the best talent globally, and at the best cost."

When it comes to the quality of working conditions," he points out, "IT professionals in India live and work in conditions comparable to their counterparts in the U.S." For iGate in particular, it was recently named the number one employer in the entire IT industry in India by IDC-Dataquest, beating well-known companies like IBM, Accenture, Microsoft, and Infosys. Another recent survey ranked iGate the second best employer among all industries in India, not just IT. "iGate's 15-acre campus in Bangalore, which seats over 3,000 employees, is better than most corporate headquarters in the U.S.," he proudly says. "And we just received the honor of being named the "Greenest Campus" in Bangalore."

Also overlooked in the debate over outsourcing, he adds, is the fact that it actually helps the American economy: "Most people aren't aware that in the service world, the U.S. is the recipient of more outsourced work from other countries than the other way around. Chinese, Brazilian, Indian, and other foreign companies outsource banking, advertising, legal, and a host of other services to U.S. companies. That's why the U.S. has a trade surplus in services."

His global view of the world comes from growing up in Bombay, in a middle-class family, the son of a banker, the youngest of three boys. The grinding poverty featured in the Academy Award–winning motion picture Slumdog Millionaire was just a few miles away. He did very well in high school and was accepted to the highly selective Indian Institute of Technology to study engineering, but—halfway through—his independent streak surfaced. He didn't want to limit his future career to only engineering.

After getting his IT degree, he came to Carnegie Mellon to study business. An entrepreneurship class he took from the late Tepper Professor Jack Thorne made him even more convinced that he didn't want a boss. He always figured that after graduating from Carnegie Mellon, he would stay a few years in the States before returning to India. But first, he wanted to establish himself as an entrepreneur. At 23, he launched a startup that made specialized medical devices. The company attracted investors but not enough customers. "We lost money, but I learned a lot of lessons—about business, about people, about dealing with difficult situations. And I still didn’t want to work for anybody else."

Then came Mastech and iGate and a life that became entrenched in Pittsburgh, not India. Staying in Pittsburgh has kept him active at Carnegie Mellon, where he is a university trustee and most recently, became chair of the Advancement Committee. "I have the utmost respect for Carnegie Mellon—its leadership, its faculty, and its students," he says. "It's an honor to work with such incredibly talented individuals at one of the world's leading universities. And as an entrepreneur, I'm amazed at how Carnegie Mellon accomplishes so much, in spite of having such limited resources relative to its peers."

His philanthropy extends beyond Carnegie Mellon. He is active in nonprofits ranging from the United Way Worldwide to Impact India, which provides free surgical and medical care to some of the poorest people in India. He feels a strong obligation to help where he can. "So much of what I’m blessed with is the result of factors outside my control—the family I was born into, the environment I grew up in, the help I got from others during tough times."

In Pittsburgh, he lives on a golf community, but he doesn’t make it out on the links often because he doesn’t want to be away from his family. That’s why you might find him after work "jamming" with his son, Rohan, on guitar, drums, and keyboard, or gossiping on the phone with his 19-year-old daughter, Shalina, an international studies major at George Washington University. Wadhwani usually has plenty of scoops for her, ever since he started reading magazines like People, so he could better relate to his teenage daughter. Shalina says, with a laugh, that her father has come to know more "dirt" about A-list celebrities than she does.

But she quickly adds that he’s also taught her the value of staying in touch with current affairs, something he does by reading The Economist, Foreign Affairs, and a host of other worldly publications. "My father taught me that you get ahead in the long run if you know what’s going on in the world," she says.

He’s taught something valuable to Rohan, too, who is grateful that his father didn’t merely tell him what to do with his dueling girlfriend dilemma. Instead, he provided him with a thought-process for making a decision. Rohan followed his father's suggestion of putting himself in his girlfriend’s shoes, of thinking about what's honorable and what isn’t, of not giving into temptation at the expense of others. He says now his girlfriend needn’t have any worries about his loyalty.

Cristina Rouvalis is an award-winning former newspaper reporter. She is a regular contributor to this magazine.