If you want an average successful life, it doesn’t take much planning. Just stay out of trouble, go to school, and apply for jobs you might like. But if you want something extraordinary, you have two paths:
1. Become the best at one specific thing.
2. Become very good (top 25%) at two or more things.
The first strategy is difficult to the point of near impossibility. Few people will ever play in the NBA or make a platinum album. I don’t recommend anyone even try.
The second strategy is fairly easy. Everyone has at least a few areas in which they could be in the top 25% with some effort. In my case, I can draw better than most people, but I’m hardly an artist. And I’m not any funnier than the average standup comedian who never makes it big, but I’m funnier than most people. The magic is that few people can draw well and write jokes. It’s the combination of the two that makes what I do so rare. And when you add in my business background, suddenly I had a topic that few cartoonists could hope to understand without living it.
http://dilbertblog.typepad.com/the_dilbert_blog/2007/07/care...
Or, are you only talking about "foreigners" (who look foreign) who speak the host language?
However, in a major metropolitan area like Nagoya, you could fit all programmers who are functionally bilingual in a room the size of my kitchen. (It might have actually happened once. Three in one place, crikey.)
There is a certain benefit to having one token white guy around who speaks Japanese, too, but I've got higher ambitions in life than being the token white guy. Besides, every organization only needs one token white guy, but e.g. my employers would hire twelve clones of me for bilingualism if they could.
[Edit: which reminds me. Here's my algorithm for ranking language choices for anyone looking for career prospects: sum(trade between your country and of all countries speaking that language) / sum(number of Americans who speak the language better than you + number of relevant foreigners who speak English better than you speak their language).
The languages that consistently top this heuristic are Korean, Japanese, and maybe Chinese. If you're looking for employment in government, Arabic and possibly Russian are good bets, too. I'd stay away from Spanish for career purposes. I love being able to speak it, don't get me wrong, but you're asking to compete with literally millions of natively bilingual American Hispanics and competing with millions is not the point of the exercise.
The programmers who are functionally bilingual in your kitchen, were they all white? Frankly my feeling is that a Japanese, fully bilingual with English, would still be at a disadvantage to a Caucasian who speaks English and passable Japanese. That is to say, P(speaks English + Japanese | Japanese) > P(speaks English + Japanese | Caucasian American), which makes the latter more expensive, or am I mistaken?
I was once advised that to make myself competitive with multilingualism I should study law, and I thought, if that's really what it takes, then, whatever.
Learn a differentiating skill or two and suddenly you're the best programmer in the niche. Human languages, domain expertise, business/soft skills, etc etc. (I am no great shakes as a programmer but, if I actually cared to be "gainfully employed" for the duration of my career, being bilingual in Japanese/English and capable of programming my way out of a paper bag would pretty much guarantee it.)