What is the difference between being taught and being an autodidact?
In my experience, the motivation has oftentimes been different. If I am being taught, it is the motivation of the teacher for the student to acquire knowledge. If you are an autodidact, you are probably actively seeking out knowledge to solve a problem you are having.
A good teacher creates the same experience and makes the student crave the knowledge.
In programming and math, that might be achieved by giving the problem before the solution.
Find the shortest path giving the following constraints and struggeling with the available tools to produce a working solution, will prepare the mind of the learner much better for the solution.