Depends on language and the stack but I would say best way to learn is to practice fail and practice again there is no fast way to learn. Only a fast way to have knowledge of a programming language. My advice to you is start out by giving yourself small projects and introduce new technologies into every new one you do.
Designing is pretty much the same, it would help to understand color theory, typography, and practice redesigning existing companies or make up your own. Same rules applies practice.