Learning how to program is HARD. Very hard.
It's so hard that I imagine many beginners drop out because they think it's always going to stay hard.
But the good news is that if you stick with it, keep learning, keep trying and keep coding, then eventually you slowly accumulate enough understanding that the smoke of frustration clears and you start to become good at it, recognising problems, recognising ways of doing things, understanding how things are done. There is a sense of enlightenment when eventually you cross that threshold from beginner to competent. It's a great feeling.
But the thing that drives me mad is that I have to go back to being a beginner every time I need to learn a new technology.
After many cycles of learning new technologies I'm starting to recognise the process of being thrown back almost to beginner level each time I want to do something new.
But I now recognise this frustrating learning process and know how to attack it. Here's what I do:
I read lots of basic tutorials, I don't try to deeply understand - too many pieces of the puzzle are missing, so I skim.
I try to find some code examples that are very simple and very isolated and depend on no other tools or frameworks.
I try to find complete, or larger applications that are "doing it the right way", get them to run and install, poke around inside and see how the structure of a larger application holds together.
I might have had some specific questions or problems by this point so I post to the appropriate forum on reddit, or maybe email the author, or if I'm feeling masochistic, post a question to StackOverflow.
Essentially I aim to get one little thing to work - to make a chink in the armour of understanding. In this case for example I am aiming to get some data back from a web server and display it, and secondly to build an HTML form and POST it to the server.
I read the introduction documentation to how key related technologies work. In this case obviously I have read introductions to react.js but it seems I also need to at least have a passing understanding of gulp and require and browserify and sass, so I fairly rapidly skim some intro documentation so I know how they fit into the picture and why they are there.
All during this process I am feeling frustrated and slow and unproductive. I have probably spent days achieving effectively nothing. If I was writing Python I would have been able to build almost a complete system.
One of the challenging aspects of this type of learning is that at the beginning of the process it's not even necessarily clear what you are trying to do. So along the way, as things become more clear, I form mini-goals and aim for them. In this case for example one of my mini-goals is to buy a react.js based template and get it running standalone on a web server (sound easy? yes it should be, but for a beginner it's HARD).
After getting some small thing to work, probably one or two pieces of the puzzle are starting to fall into place, at least a little bit. It's now that I go back to the beginning and repeat the cycle. Right back to the start. Re-read all those introductions, go back through all the code samples and re-do all the learning. In this second pass things should start to make alot more sense. Several lightbulbs should switch on. You will realise that the stuff you read previously already explained details that you missed, puzzles to solve, strange concepts and things you have been wondering about - it's just that the first time around you didn't have enough frame of reference to tie it all in to.
And all the time you need to be trying to get yourself in a position to write code. Trying to get enough understanding to do a bit of coding. Understanding only truly comes from coding with real purpose. The objective of the reading and digging about is to get you to the code.
As mentioned before I like to write small isolated code samples at first, but ideally I am looking for a larger open source code base that already does something similar to what I am trying to do, and I want to work within it. It's MUCH easier to grasp a new development technology from within a codebase that actually makes it work. Paradoxically it is also much harder because you have been dropped in the deep end, but that is a necessary part of the path of learning.
When faced with learning a new technology I feel some sense of dread. There's always a temptation to not learn the technology that you know would be the best one to know if the long run, but instead learn something simpler and easier. Don't take that path - you'll just end up knowing the wrong technology and still not have moved towards deep understanding of the right technology.
So that is how I learn a new technology. It's frustrating and feels unproductive but deeply necessary. To be a programmer in 2015 you need to competence with many types of technology and expertise with a few too. If you avoid this then you will not be able to get the stuff built that you need to.
Even if you have attained enlightenment with some technology you will still be constantly repeating smaller iterations of this process as you learn new details about languages and frameworks, it never ends but hopefully becomes easier and faster.
You're going to need to repeat this learning process over and over and over so you may as well recognise the pattern of frustration through to enlightenment.
It's VERY hard at first but it doesn't stay hard forever - work hard at getting through the initial beginner phase to competence.
It's the enlightenment stage that I look forward to - that's when programming becomes fun and the computer becomes your canvas upon which to paint your ideas and inspiration.