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.
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...)
Get dozens of book recommendations delivered straight to your inbox every Thursday.