So you have learnt about a new programming language or framework in the class. You have also done some practicals and are ok with the language. But there is no mastery, which would take a whole lot of practice. Also you may find out that you are not clear about many of the fundamentals.
A great way to shorten the learning curve and get mastery at whatever you are learning is to Teach!
Teach whatever you are asked. Teach whatever you have learnt. As soon as you have done written some practice code – find a pupil and teach him what you have just learnt. Make sure the student is a kind of guy who asks questions – lots of questions.
When they ask back questions – on things and concepts that are not clear to them, you will have to think about those. Your mind makes associations which will help you to remember those. Also by trying to clear his doubts you will find problems that you will solve and as a result understand the programming better.
This applies not just for learning code but also for every new thing you learn –