People have different perceptions/experiences/opinions for this rather controversial question. I'd like to say my own, but as a reply to the post by my dear fellow Niyaz who is an Indian and whose answer is seen as an honest one and certainly is the popular answer among users here even more so that he happens to be an Indian.
Well, let me start with saying that I too am an Indian. I will talk with real facts and not like Niyaz who is clearly projecting his personal disappointments and dislikings, relating them to delusioned facts of his own. Here is my reply to his views followed by my comments about topic.
"1) Major Indian software companies are recruiting low quality programmers".
This depends on the technical demands of the project. If position is a challenging one then let me assure you that they go to the best of the places to find top notch talent available but if the position is a trivial one with less technical demands then companies go to according places. But wherever they go for recruitment they recruit the best in whatever is available. Every person who conducts interview selects the best among the participants. I guess the above is true with the rest of the world too!
"2. A large percentage (I am afraid more that 50%) of the programmers are from non-CS backgrounds. Many are mechanical engineers, electrical/electronics engineers or civil engineers."
This is statistically VERY VERY WRONG. Every year for every 100 engineering graduates that pass out there are 20% computer science graduates 10% information technology graduates 15% Electronics and communications graduates 10% mechanical 10% electrical 10% master of computer applications(MCA) 5% M. Tech(equivalent to M.S.) 10% civil 10% rest (chemical/metallurgy etc).
Out of these, 17% comuter engineers, 8% information technology engineers 5% electronics and communications 10% MCA 5% M Tech engineers get programmer jobs. (missing small number go for higher studies or other relevant jobs in case of E & C). i.e. 17 + 8 + 5 + 10 + 5 = 45% capable programmers from desired educational background.
Among rest 2% mechanical 2% electrical 2% from rest other field get programmer jobs, generally in less technically demanding project or testing. (rest go for higher studies or jobs in relevant area) ...i.e. 6% to 8% of programmers from other educational backgrounds, and companies recruit them for not so challenging roles.
Now this 6% to 8% is a (i'll take it as 7%) is more than 6 times lesser than 45% of capable programmers. i.e for every programmer from an undesired educational background there are 7 programmers from desired educational backgrounds. So, that is hugely contradictory to what Niyaz says (more than 50% are from undesired backgrounds).
"3) The pay scales for fresher posts here are not the best even according to Indian standards."
This again depends on company. Bigger companies offer lesser package for freshers. Have to agree here. I donno how this is related to the question asked anyway!
"4) We don't care for the quality of the work we do for you......no one cares about the quality of their code they do for some American company which they don't know much about. You will get quality code only if it comes from your heart - like when you code for yourself....blah blah"
Every programmer respects the code he/she writes. Everyone likes to write efficient code. They don't care which country the company they work for belongs to. For a programmer, programming language is the religion and employer is God. Programming is passion and not patriotism as in "hey, if I work for an Indian company I'll give my best else I won't".
It's rather about indiviadual how honest he is about his work, it's no way related to the point of view Niyaz is projecting here. It is true in every nation in this world.
"5) Part of the reason why many companies recruit low quality programmers is that the works we get here are mainly some support work or very monotonous and boring development work that looks like it will take ages to get completed"
Somewhat agree. If kind of work(position) doesn't demand high expertise why bother paying double up for high expertise?
"6)I never meant that there are no quality programmers in India. There are many, but the chances are very low that big software giants will recruit these bright minds (which they cannot afford)"
If kind of work(position) doesn't demand high expertise why bother paying double up for high expertise? They buy high quality for the positions that require high quality. It is true anywhere in the world.
To sum it up, you'll find incompetent programmers everywhere in the world. It's not that they are concetrated more in a region. Anywhere you go you'll find few top qulity and a few really incompetent. And the programmer attitude is rather a characteristic of the individual and not anyway related to nationality. I am hugely disappointed to see someone givign a patriotic dimension and reasoning for the love for programming.