There are a lot of people who want to believe that computer science ability is some sort of innate talent. That either you have a special brain that can handle it or you don’t. Teachers want to believe in it so that when students struggle they can blame something other than their teaching. Students want to believe it so they don’t have to work at something that may not be coming easily. And people who are good at developing software want to believe that they are somehow more special than other people.
Alas the research doesn’t support this theory. And there is a research paper on the Geek Gene paper [PDF]. I’d like to see more research on the topic but generally it appears that student ability to learn CS (or specifically programming) correlates a lot closer to teaching ability on the teacher’s part and work effort on the student’s part. Imagine that! Students who work harder learn better. Who would have thought.
I think we see all sorts of subjects that some students learn better or more easily than others. Hard work and focus mean that pretty much anyone can learn the basics of pretty much any subject. Interest seems to be a big factor in any subject.
Building excitement and interest is something teachers can do. They can communicate enthusiasm and they can make projects interesting. Or they can focus on narrow interest projects that reach only a few students. But a lot is up to the teacher.
Of course students have to put in some effort as well. We don’t accept (for the most part) a cry of “I'm just not good at math.” We still make all students take math courses. We don’t accept “I’m genetically incapable of learning history.” We just make students work harder.
Everyone can learn some computer science just like everyone can learn some reading, writing and mathematics. We shouldn’t be looking for excuses not to teach everyone.