When I was a graduate student in physics, I noticed one of my fellow graduate students would learn a new computer language not by taking a course (usually C++) in the language, but by instead taking an existing program (usually in FORTRAN) and converting it to the new language. This method is effective, as long as you are not converting a trivial program, because the converted program provides the necessary feedback. You can compare your converted program with the original.
According to Anders Ericsson, feedback is one of the nessessary components of developing expert performance. Anders Ericsson is perhaps the world's foremost expertise on expertise. His book Peak: Secrets from the New Science of Expertise I highly recommend.