The "bad Indian programmer" meme seems to have less to do with India itself than with India as a place where lots of people go for cheap outsourcing. It's the cheap outsourcing part that's the problem. I've been fortunate to work with some very good Indian programmers, most of whom were first part of an independent company with their own products and then were colleagues within my own company when we bought them out. I've also worked with some really crappy Indian programmers, and some really crappy Russian ones, and even some really crappy American ones, who all worked at "body shops" offering the lowest bids for the kinds of programming everybody wants to outsource. There's a pattern, and it's loosely related to nationality, but it's not as simple as programmers from one country being better than programmers from another.
Who remembers when "made in Japan" meant "cheap plastic crap"? As their manufacturing industry matured, they went from that to leading the world in quality and precision. Similarly, India might once have been the place one went for cheap programmers. As their IT industry matures, it will become more and more a place where one can go for good programmers. Some of this is already happening, as outsourcing to India becomes more expensive and people turn to cheaper alternatives. Welcome to the global economy.
There's a lot of this in play, there are truly terrible programmers all over the world, but most of those in the US aren't doing freelance contract work, they're buried in some giant organization turning out awful code nobody will ever see.
Still, there is a certain change in flavor on places like Stack Overflow when India wakes up and starts asking questions. Maybe this isn't a sign of "bad programmers" so much as it's a sign that there's a lot of people in India that speak English and are trying to learn how to program better. There could be just as many in China or even Brazil but there they prefer to ask questions in their native language instead.
Yes, on the whole, we somehow learn broken English pretty soon to ask questions on the internet :) (we take ages to learn good English). I guess everything is governed by survival instincts when it comes to such a big population.
One reason is also the outdated Computer Science courses in India that teach wrong things to start with (The 90's Turbo C++ anyone? - That's the defacto "C++" that an average Indian is taught in schools even today). Then as you said, so many outsourcing companies want manpower (not talent) - and they (Indians) start to find it as one lucrative job, mostly not out of interest, but to earn a bread and butter for their families.
> As their manufacturing industry matured, they went from that to leading the world in quality and precision. Similarly, India might once have been the place one went for cheap programmers.
Right now, I can't think of any country (or region) that's made software quality a priority. Most of the effort is placed on reducing costs, which is accomplished by increasing programmer productivity (either by tools or longer hours or both).
Who remembers when "made in Japan" meant "cheap plastic crap"? As their manufacturing industry matured, they went from that to leading the world in quality and precision. Similarly, India might once have been the place one went for cheap programmers. As their IT industry matures, it will become more and more a place where one can go for good programmers. Some of this is already happening, as outsourcing to India becomes more expensive and people turn to cheaper alternatives. Welcome to the global economy.