When I wanted to learn C, I bought six or seven books, some of which came with a compiler. I read each book.
Now that probably sounds like I am a genius, sucking down information directly from the text. But what really happened wasn't so flattering at all: I flailed. It wasn't until the third book or so that I finally got anything to compile, and I think it was book 4 where I figured out how the hell to read pointers.
I really sucked at learning programming.
When I picked up C++, we were on a family vacation. The kids all played in the pool and did fun stuff. I sat by the pool and read C++ books. If I thought C was tough, C++ was a killer.
I finally got it, though.
Last year, when I wanted to finally learn Functional Programming (I'm 45) I did the same thing. And this time, guess what? Even after the books I sucked.
So I started writing little projects, which also sucked. I went back and read the books again. I wrote some more code. I still suck at it, but I suck a little less. Perhaps in another year or two I'll consider myself proficient.
Yes, it is terribly awesome to sit down in front of a client with a tough problem and do some wizardry on the screen and feel like the hero. I spent my 20s and part of my 30s being the super-hero star guy. I had a blast.
But that's just hot-dogging: showboating. (People do it for fun and to make their job more like a theater performance) In reality for every one of those times I was showboating there were hundreds of hours spent trying to figure out what the hell was going on with something.
I think it might be easy to look at other coders who are like I was and get the wrong impression. Yes, some folks are smarter or have a better recall than others, but guys with huge recall ability many times get wrapped up in some kind of minutia that's not important to the team. Everybody has flaws. This will sound very strange to hear, but it's true: you can be the worst programmer on a programming team and be the most valuable and critical person there. I've seen it happen dozens of times.
The question is: are you working at making yourself better? Not how smart you are, how you feel about programming, or any of that. Just a simple question about what kinds of habits you have in place to continue to improve. If you have those habits, you'll either become a better coder or eventually work out what you're meant to do. But you have to have those habits first.
So my advice is a little less angst and a little more work. Both to you and me :)
EDIT: By some kind of weird twist of fate I have been thinking about this a lot recently, because I was writing a review of the best book I've ever read that improved my coding, Code Complete. http://news.ycombinator.com/item?id=2263127