Valid Envrionment: There must be a closed space with valid solutions, i.e. things don’t randomly change.
Many Repetitions: You must do it again and again!
Timely Feedback: You must get feedback, ask question!
Deliberate Practice: Code, Code, Code
I will add to this, in my experience, an optomistic outlook and persistent motivation are not only the best teachers, but greater indicators of success than natural intelligence.