A great way to feel more inclined to learn programming is sharing your progress within a community.
 projects are meant exactly for that.
Every day for 100/301 days tweet your progress publicly. Just seeing how people like, share, comment your posts every day will help to get you moving forward.

Check their respective websites: https://www.100daysofcode.com/ and https://301daysofcode.com/

The short and sweet answer is: whenever, wherever, however you can.

SoloLearn

What I mean is that you can use the commute time to your work by coding on your phone or learning with applications like Enki or SoloLearn. It’s a very good learning experience!

When you are at home and have 10 minutes of free time – use it! Do that next exercise on FreeCodeCamp or change one line in your current project. Reread and better understand the code of some project one more time.

What you will find is that your attitude matters a lot when trying to attain a new skill. Don’t hesitate, don’t think too much. Just use every opportunity possible to move forward. Once you don’t hesitate to use a small window while riding a bus to learn more, you won’t hesitate to spend 3 hours on the weekend too! Stop doing some progress. Start doing as much progress as your current life situation allows you to. Not only you will learn, but you will be energized, positive and look forward to doing more each day.

Thoughts -> Words -> Actions -> Habits -> Character -> Purpose

Thoughts turn into words, words turn into actions, actions turn into habits…

When you decide to sit idly when you could be learning, you lose much more than some time spent on learning. You consciously decide that it’s not that important and you are fine as you are. You resign, when you don’t need to and tell yourself that your goals aren’t that important. When you decide to use that moment instead and put more effort, it builds up. You become serious about it and the results are sure to come.

Happy results in the new, 2019 year!