After coding a lot, and talking to many people, I have decided that while most people can be trained to be decent programmers; the critical ingredient is both an interest and the ability to sit down and do it for long periods of time.
As long as you have both you will find your path.
For me I learned a lot by reading books, coding my own things, and reading other people’s code. Often on first read, I was intimidated. Sometime I had to take a while to figure out new things. More than once I had to stare at a few dozen lines of code all afternoon.
It really helps to have a debugger to step through each line of code as it runs . This shows the values of variables at each step
And that assumes the code runs at all. I learned to debug my own code, when it would not run, by making every conceivable error several times until I could read the output in my sleep and know how I messed up. That takes a while to make that many errors!
But debugging is definitely very important