I can't upvote this enough. Its the same as learning to read or write or play a musical instrument.
You can try to memorize the syntax but that won't give you much understanding on why things are that way leading to brittle knowledge that quickly goes away.
Practice, on the other hand, directly develops the understanding and familiarity with the subject as you get to see hands-on how things work and when you make mistakes you learn why things are the way they are.
I'm pretty sure almost nobody thinks consciously of how to work their mouth muscles in order to talk, they just think of the words. That's what practice gets you.
I'm inclined to disagree with repetition. Spaced repetition may be effective but taking something and describing it in your own words(elaboration) will help with retention AND comprehension. If you can explain something to someone else well enough for then to understand it, then you probably understand it decently enough to be well on your way to memorization.
True, but to reach that level you need to practice a lot.
You gain that comprehension through practice first and then you polish it by trying to explain it to someone else.
I know I'll write tons of toy programs to teach myself a concept before I try to explain it to someone, just like I'll try every position of a scale until I can effortlessly play it before I try to show it off.
You can try to memorize the syntax but that won't give you much understanding on why things are that way leading to brittle knowledge that quickly goes away.
Practice, on the other hand, directly develops the understanding and familiarity with the subject as you get to see hands-on how things work and when you make mistakes you learn why things are the way they are.
I'm pretty sure almost nobody thinks consciously of how to work their mouth muscles in order to talk, they just think of the words. That's what practice gets you.