In other words: in any given study session, you’re more likely to retain the information that you learned near the beginning and the end of the session and more likely to forget the information from the middle of the session.
You want to maximize the number of beginnings and ends. That’s why it’s better to have multiple short sessions instead of a few long sessions when it comes to learning and absorbing new material.
The next time you sit down to learn code, take it one topic at a time and take a short break between each topic. (Just make sure to prevent your breaks from turning into procrastination!)Computer Science Computer Science Computer Science Computer Science Computer Science
Review, Review, Review
Another reason, why cramming is antithetical to long-term knowledge retention is because memory fades over time. This isn’t always true — I’m sure we all have a few childhood memories that will never disappear — but it seems to be the general case for memories that aren’t tied to emotion.
There is some debate whether memory itself decays due to time (decay theory) or simply gets pushed out and replaced by new memories over time (interference theory). Whichever theory you subscribe to, the result is that older memories are more likely to fade away.