Sam Soffes says to learn by doing:
When you get started with something new, you’ll suck at it. That’s okay. No one knows everything or is good the first time they do something. This is normal. Don’t get discouraged. You’re making something. The process alone should be exciting. Once you make something, no matter how simple it is, you’ve made something!
Yep. There’s no better way to learn something than by diving in and trying to build something. You figure out real quick what you need to learn, then you learn it, and keep building. The motivation comes from the excitement of making an idea reality, and the idea guides what you need to learn.