I started when I was about 12, with a book about C++. When it came to “classes”, it started to get way to difficult for me to understand so I dropped it for a few years.
Then I worked on a game in Rpg-Maker with their event-system a few years later, and when I ran into problems with both performance and features, I was kind of forced to learn scripting (which was ruby/rgss). From that, I re-learned c++ “properly”, having a few projects that didn't go anywhere (I was lacking so much experience in code-design, that after a few months of working on them they became virtually unmangable).
Still, when I came to university for a game-dev class, I was already way ahead in knowledge than my peers, and could focus on learning proper design. Thats when I started with my game-engine, and with a lot more focus on good code-design and a lot of refactoring, I've been on it for about 10 years now.
So when it comes to programming, I think you need both perseverance, dedication, the willingness to learn/fail and learn from your mistakes, and never fall into the trap of thinking you know everything (because you most likely don't).