> Similar to how students who spend most of their time practicing what they are studying with actual exercises achieve higher grades
This is spot on.
> build a mental model of the code with every new line of code
This idea has been explored in depth in the Peter Naur's excellent paper, "Programming as theory building" [1] (also extensively discussed on HN [2]). If you haven't read it yet, I bet you will enjoy it a lot. :)