Can you learn to program better?
Phil Haack has a post that you should read. There is an interesting quote there:
I am not convinced by the idea that developers are either born with it or they are not. Where’s the empirical evidence to suport these types of claims? Can a programmer move from say the 50th to 90th percentile?
I have a different view of programmers, as you can see below:

The first steps for beginners are relatively easy to start, then there is the first hump, which is usually where the non-programmers quits. Then there is the big hump, which a lot of people simple never cross. This means that a lot of people are stuck on the basic level.
People that do make the jump across, usually have a lot of hard time, but they tend to not stay there for a long time. Either they pass, in which case they are going to be great programmers, or they stays there (or more often, slide back to the start).
I don't believe that it is a matter of To Be or Not To Be, some people have easier time doing it, some people have harder time. I believe that it is the big leap in the middle that not many cross that makes the difference.
At 17, I couldn't get my head around dynamic memory management (in Pascal), at 19, I grokked this stuff without a problem. I can't really say what has changed, though.
Update: This had me in stitches:
I’ve worked with developers who have 10, 15, 20 years in the industry and couldn’t code a virtual rat through a maze consisting of two parallel lines.