Do them simultaneously! Practice coding while you are reading/learning about programming. Type out the examples, expand upon them. Change them slightly and just enough to prove you learned what you just read.
Comment by functionalStoic on "Reading vs Practising: Where should I put more focus on while learning a programming language and why?" | Hashnode