As you finish a subject, see if there's a corresponding book in the Art of Problem Solving store [0]; you can revisit the subject at a deeper level that will strengthen your foundation. The AoPS books will also expose you to areas useful in programming like discrete mathematics.
Before any of the above, take Coursera's Learning How to Learn course. You'll learn lots of effective strategies to get the most out of your efforts. For example, you can use Anki [1] to remember definitions and concepts you've managed to understand and to schedule review of problems you've already solved.
[0] https://artofproblemsolving.com/store/recommendations.php