I firmly believe that either you are born with the ability to be a programmer or you're not. That's not saying that it's good or bad, but I believe a lot of it is just how your brain is configured. It's as innate as the ability to shoot baskets, or throw a football, or as innate as gaining energy when interacting with people (extrovert) vs losing energy when interacting with people (introvert).
Case in point: there are some people who are extremely smart, but don't have the ability to visualize things like a map in their head. I know someone who loves cars, has been into cars since he was a teenager, and loves driving. However, for the life of him, he can't read a map. He's not dumb at all, he's very intelligent and excellent with computers. But he has no ability to visualize things in his head and spin them around. So when he's given instructions on where to go, he needs landmarks, ie. "Turn left at the McDonald's and turn right when you get to the 4th traffic light." He can't process "Go north on Main Street, and then head East along Central Ave."
I believe programming is the same way. There's a type of inner mental gymnastics that you need to do in order to program well, because a lot of the things are very cerebral. Some people just can't do it. I'm not saying that they can't be taught how to program to an adequate level, but the fact that it so goes against the mesh of how their thought process works, it just won't be enjoyable to them. They will never be better than adequate.
Of course, most of us here probably can't picture that, so many of you might think I'm wrong. But put it in another perspective. We can all be taught to throw a football perfectly. But does that mean we'll be any good at it? Probably not. If we don't have the physical ability to throw a football more than 10-15 yards (like me), will it be fun for us? Probably not. But if you were a football player, hanging out with a bunch of other football players, you wouldn't understand why everyone can't throw a football more than 40 yards.
The same goes for Sales. I've come to learn from my friends who are salesmen that the sales cycle is largely algorithmic. So it can be taught. But getting out in front of customers every day, chit-chatting, engaging them, etc, is something that many of us simply aren't built to do. It takes a certain personality type to actually enjoy this. And there are plenty of them that do enjoy this and make vast sums of money. But if I were put in that position, I would hate every second, and would likely get fired.
So yes, programming can be taught, but I truly believe that there is an innate mental configuration that determines whether or not you can digest and learn the information and whether you'll be good at it, and more importantly whether or not you'll actually enjoy it.