I recently answered a question on Quora:
Is it true that programming is not for everyone?
And thought I'd elaborate my take on this here..
It is my take that any human brain with the capability to learn has the capability to learn programming. So yes, if you're reading this, you either already can or could likely do it.
Some people point out requirements like being a silent thinker or someone with a lot of patience or a theoretically gifted mind. Those might help to excel, but I've enjoyed programming since the age of 9, yet I don't regard myself particularly blessed with these traits.
I have always loved building things, and that got me hooked on the feedback loop of making incremental changes and slowly seeing abstract thoughts transform into something fun or valuable. Crafting something out of nothing. This appreciation, to me, is the main thing that sets potential programmers apart from others. I believe however that if you treat your brain as a simple animal that needs its rewards to learn a new trick, anybody could grow this appreciation.
My nephew got a taste of it in Scratch, and is now taking his first steps in Python and reading all he can about it. It's hard for him as most great resources to learn programming aren't available in Dutch and he's not proficient in English yet. But he has witnessed his ideas come to life and beat me in his own simple reaction-time-based video game, and this provides him with enough fuel to make rest of the journey effortless. His parents restrict computer-time (probably a good thing?), and so he's often found plotting his next code on paper :scream:.
On the other hand I have had very capable friends in their 20s that would try to get into programming with the prospect of job security, and abandon it because they could not get into that grove. I believe in most cases a big contributor to this, was an initial focus on the wrong thing: the perceived destination. They did not allow themselves to meander into seemingly meaningless directions, even though that might have been more fun.
If you could enjoy inventing things with LEGO® Technic back in the day, you'll likely quickly be able to tap into that intrinsic motivation. To those having harder time to hook programming into their brain's reward system, try to focus your learning efforts on establishing just that initially, and the rest will follow naturally.
Just one opinion based on one person's experience. What's yours? (comments welcome on HN or Reddit)