An old University of Texas study made the following findings.
People retain:
10 percent of what they read
20 percent of what they hear
30 percent of what they see
50 percent of what they see and hear
70 percent of what they do
90 percent of what they teach
Following this logic the best way to LEARN something and retain what you have learned is to make your best effort at teaching it to somebody else.
Even though I coasted through Comp Sci 101 in school I took a tutoring job for C++ and didn't actually LEARN C++ until I was forced to teach it to struggling students. It was like an orgy of lightbulbs going off in my head as I helped non CS grads with their assignments.