However, between things like the trend to train your replacements, H1-B visas being abused, and a belief that everyone should be trained to code by means of mandatory public education, it really doesn't look like the industry has a very healthy future.
It's interesting to compare the 'coding' industry with other knowledge-based industries, like law, medicine, traditional engineering, or even allied health. The older professions have strong accrediting or credentialing systems that limit, either practically or legally, who and how many people can do certain tasks. In many cases, those professional organizations fought ruthlessly against the commoditization of their skills, usually using the fear of life-threatening incompetence as a lever. Just compare the number of H1-B's issued to "IT" and to registered nurses.
Coders seem resistant to such a strong organization. Maybe because "unions are bad." Maybe because there's a lot of self-teaching, and formal accreditation looks threatening. Maybe it's just not a social profession. One way or another, it looks to me like the IT/development professionals have just failed to organize effectively.