Check out this amazing article on learning programming: Gearing up for success.
I wish this had been written when I first started.
I have especially benefited throughout the years from using The Pomodoro Technique, concentrating hard and then going for a walk/resting my mind, and focusing on the process of fun and learning instead of the outcome.
But to get all of the actionable tips read the article here: Gearing up for success.