[0] https://www.amazon.com/Make-Stick-Science-Successful-Learnin...
This and many more tricks were learned by reading "Make it Stick: The Science of Successful Learning" -- https://www.amazon.com/Make-Stick-Science-Successful-Learnin...
It's very well studied. I'd start by reading a cognitive science textbook and go from there. I have Cognition by Reisberg[0], it was well-written and well-structured.
Alternatively, an entertaining and informative popular account is Make It Stick by Brown, Roediger and McDaniel[1].
I do agree that the research findings are greatly underapplied, though.
[0] https://www.amazon.com/Cognition-Exploring-Science-Mind-Seve...
[1] https://www.amazon.com/Make-Stick-Science-Successful-Learnin...
No - simply re-reading your notes or the original text is not optimal and can give you a false sense of progress.
It's important that your repetition involves active recall - that is, you must close the textbook/notebook and try to recall the key definitions and ideas. Only then should you open your notebook and compare your current knowledge with the original information. If there are large gaps in your knowledge, schedule the next review soon otherwise leave it longer.
I've found it's quite painful to sit and force my mind to grasp onto ideas which are just out of reach, especially when the information is just a click away, but it leads to much better retention of important knowledge.
A great book on this subject is Making It Stick: https://www.amazon.com/Make-Stick-Science-Successful-Learnin...
A book like https://www.amazon.com/Make-Stick-Science-Successful-Learnin... is accessible and provides a good survey of what we know about how the brain learns and remembers things, and how it relates to existing practices.
1. https://www.amazon.com/Mind-Numbers-Science-Flunked-Algebra/...
2. https://www.coursera.org/learn/learning-how-to-learn/
3. https://www.amazon.com/Make-Stick-Science-Successful-Learnin...
4. https://www.amazon.com/How-We-Learn-Surprising-Happens-ebook...
[0] https://www.amazon.com/Make-Stick-Science-Successful-Learnin...
It's pretty good.
The main idea is that learning is supposed to feel hard. That sense of frustration and confusion is what building new neural connections feels like.
If you only spent a few weeks working on that new project, then you probably didn't spend near the amount of time Bill Gates spent writing, thinking about, and reviewing his Altair BASIC code. Even though he whipped up his code in less than a month or two prior to the first MITS demo, he likely spent weeks or months after that demo modifying and polishing the BASIC interpreter for subsequent releases. You didn't mention your experience level, but Gates' years of prior programming experience likely benefited him as well, providing him with a nice cognitive framework to which lots of these facts could "stick."
One additional thing: when Gates says he still knows the source code for Altair BASIC by heart, it probably doesn't mean "completely, line-by-line" by heart. I'm guessing it means he still remembers some snippets by heart, or that he believes he could re-write it from scratch from memory (which would still be exceedingly impressive).
Some useful resources on memory and learning:
Memory and Learning: Myths and Facts (http://www.supermemo.com/articles/myths.htm)
Want to Remember Everything You'll Ever Learn? Surrender to This Algorithm (http://archive.wired.com/medtech/health/magazine/16-05/ff_wo...)
Make It Stick: The Science of Successful Learning (http://www.amazon.com/Make-It-Stick-Successful-Learning/dp/0...)