Coding is a lot like the spoken language, say for example English. Where with natural languages you convert immaterial thoughts and ideas into sentences of sound syntactical and semantical meaning so as to properly convey your original intentions, with computer languages you convert math into code.
So there are two sides to coding: knowing the language and knowing the math.
Like with any language, the more you speak it the more you become fluent in it. And the more languages you know, the more easily you can pick up on other languages. So I suggest that you focus on the math side at first. And for that, I suggest that you start with danmakufu because there is an active community of very nice and friendly people here who can help you in the Q/A thread along with the plethora of examples, tutorials, and resources that are available. Also since danmaku style games seems to be your short term goal for the moment, which is very math oriented.
You want to be very solid on your trigonometry. Specifically related to danmaku, study and grasp the differences in how generating bullets in each of the various control-flow statements (if-else, for, while, switch, etc) affects how the bullets behave.
Time frame-wise, just keep at it. You will get better if you just keep at it. I also suggest taking breaks if you get stuck, there were many times that I would do something else for a little while and notice something immediately when I get back. The brain needs a rest, but also seems to think about these things in the backburner.