People are different
Different people learn things in different ways.
Some like to listen to lectures, or read books that thoroughly explain concepts before they then start exercising, and experiment with what they just learned. Others like to get their hands dirty, and play with code until it does what they want.
Some want to fully understand what a certain line of code does, and why. Others don’t care that much about the details, and want their code to produce the right things instead. They might memorize what worked, and understand things more fully later.
Some understand concepts in logical ways, and go precisely by their definitions. Others understand things better by coming up with good analogies and metaphors. And yet others tend to simply memorize things and how they get used.
Therefore there is no one true path or one-size-fits-all approach to learning programming. Try different things, and pay attention to what works well for you, what is the most fun to you, and keeps you motivated.
If you find it hard to keep motivated working through a certain online tutorial, or if you have a hard time fully understanding what an exercise is about, then try to pick a different approach, or talk to your study group.
Consider meeting with others during the week, have some coffee and cake and hang out, read some more of this book, or do a few exercises together.
Also, consider joining local programming events, like meetups, hackdays, or a conference once in a while. That gives you a broader perspective, even if you might not be able to fully understand everything all the time. Meeting with others and hearing about their experiences can also be a good source for inspiration and motivation.
If you can’t put a lot of time into learning programming, then consider spending at least a few minutes on it every day. For example, every morning, before you leave the house, take 10 minutes to read a page in a programming book, review an exercise, or read some code. Or spend some time with it on the train on your way home from work later. This will keep your subconscious mind busy with programming concepts, and help you pick things up more easily later.