<p>
Software engineering seems to be a pretty good field, at least statistically speaking, in terms of employment and opportunities. You can check, e.g., the Bureau of Labor Statistics Occupational Outlook Handbook to compare projections and past data across several technical and non-technical fields.</p>
<p>
A few possibilities come to mind. First, the adage “you get what you pay for” might apply to some degree; your assumption that Chinese, Indian and Mexican software engineers are equally well-qualified for all development jobs demands proof. Another idea is that, all other things being equal, lower-level jobs are probably offshored first, and these jobs - in addition to being comparatively less (though still highly) skilled - do not emphasize communication. The language of technology and the Internet is English, and America has both the most English speakers of any country in the world, and the most native English speakers of anywhere in the world. This may give Americans (and the British, and Australians, and (many) Canadians, etc.) a comparative advantage in pursuing high-end jobs in the technology sector.</p>
<p>
Again, several factors may be at play here. It takes companies a while to move jobs offshore. It is possible that many, many more jobs will continue leaving. That companies don’t have all offshorable jobs offshored may simply be a logistical issue. Second, companies usually try to balance risk and reward. Hiring cheap foreign labor for sensitive or important projects may in some cases be deemed an unacceptable risk; naturally, there are varying levels of risk. Third, as mentioned earlier, perhaps there are some technology (even development) jobs for which Americans are uniquely qualified and worth the higher pay.</p>
<p>
Being curious doesn’t make you naive. All you hear on most forums and in the news is about how technology jobs are flying off of the continent like hot cakes. There are more and less susceptible areas of software development; there are areas in other disciplines which are more or less susceptible to offshoring (if you check out the BLS OOH - Google it - electrical engineers with a focus in electronics engineering were losing ground in the last report; indeed, manufacturing was largely offshored).</p>
<p>If you love CS and work hard, you should have as good a shot as anybody at getting a job that lets you live comfortably. If you want more than that, you’re going to have to be one of the best at what you do, or be one of the hardest workers at what you do, or get lucky.</p>