The software profession is in the same state that the auto industry was in, in the 1970's. And facing even heavier competition for each job.
When I started my career, 15 years ago, you could be trained on the job. You could go on to make 100+k/year, just programming. And you would continue to be trained.
But now companies can hire from abroad very easily. People coming in from abroad will work for 40k/year or less. Because their goal isn't the software career it is to get a Green card.
People here on L-1 visa get paid far less. And the companies that hire them, exclusively hire from within their own country (and ignore resumes from ordinary U.S. Citizens).
The world has 8+billion people, and with that number there are 24 potential workers for every working U.S. citizen. Don't even try competing, because as a U.S. citizen you will need several hundred thousand dollars over your lifetime just have a living wage, while a worker who comes here from abroad need only about 6000$ or less per year to achieve what is considered to be a living wage in their home country.
Your best bet is to bend your career path with the times. Choose a career that makes use of that which is culturally unique about yourself. Your fluency in English and writing skills could make you an excellent documentation professional. Documentation is not as easy to outsource (and consequently gets paid very well right now).
You can still code for free on the side, many people do. Maybe it will turn in to a programming career (for a few it has).
Further you are better off being the hammer (owner, manager) and not the nail (software engineer) in the software industry. Get an MBA and a technical degree can be a better, more lucrative path. (Be the hammer, not the nail)
The great fallacy in the software industry today is that companies are looking for great talent to fill their software engineering positions. When the fact remains that most H-1b visas are issued to people right out of college with bachelors degree, from a foreign university. These same H-1b workers are then brought in to the United States where the experienced U.S. worker (often with a more advanced degree) is required to train the foreign worker. The U.S. worker (the one with more talent and experience) is then let go.
Keep Up with TechRepublic