I'm not particularly smart. But I am resilient and will keep trying until I figure it out. Books and classes are great, but you can't depend on theory alone. Practice makes perfect. When you do, you understand why things are done a given way.
If I could go back in time, I would tell myself to stop reading so many programming books. I'd make myself write the code everyday. Rather than read about it. Figure out what it is that you want to learn. Then start practicing and learning the theory.