How do you effectively learn programming by studying from a pre-existing codebase/project?

Posted by Sure-Peaks@reddit | learnprogramming | View on Reddit | 3 comments

So I am training to learn mobile app development, and was instructed to learn through checking past projects developed by the company (tho I still feel like I haven't even completed the basics yet...)

The problem was that earlier, I felt like I was given vague instructions on reading through the code and trying to understand how it worked from there; didn't help that I couldn't get the 2nd project I was given to run at all (combination of being outdated + needing a specific "flavor" to run that I really didn't get), so I was just trying to understand how everything worked by reading each individual line. Certainly I tried to make diagrams + guesswork here and there, but honestly the whole experience felt brain-melting and kinda blanked out by the end. Now uhh it's been like a few months wasted from this now

I looked up from other sources, and it seems learning from codebases is considered effective. But I feel like I'd perform better if I was given a step-to-step process like a workbook with sequential questions, rather than having to go in blindly with complete freedom. What would be the expected complete dum-dum idiot's process for learning from a codebase, instead of trying to read every line?