I'm currently learning C++ with LearnCpp, and I really like the detailed explanations and examples. However, I sometimes get overwhelmed because there can be several ways to write code or solve the same problem.
When studying a topic, should I read the explanation, try to understand it, then close the page and recreate the code from memory? Is it better to keep the documentation open while practicing? How much should I write down versus simply understanding the concept and applying it?
I'm also wondering whether it's useful to keep my notes, exercises, small programs, and projects in a GitHub repository. I'd like to develop a study routine that helps me tell the difference between genuinely learning and merely reading.
4 Answers
The most important part is active practice. If something is unclear, make a quick note of it and continue far enough to understand the broader context. Then come back to that specific question and investigate it with the context you now have.
When practicing, pay attention to what your variables and program are actually doing during execution. If you get stuck, spend a focused amount of time trying to solve it yourself, then step away before frustration takes over. Return to the documentation or your notes, learn what you need, and try again. Repeating that cycle is much more effective than only rereading.
Yes, try writing the code yourself, but don’t treat looking at the documentation as cheating. Keeping the reference open and checking syntax when necessary is normal, and learning how to find information in documentation is an important programming skill.
You also don’t need to memorize every rarely used detail. Frequently used features will become familiar through repetition, while less common ones can be looked up when needed. C++ has many ways to solve the same problem, so for a particular project it can help to choose one reasonable approach and use it consistently instead of constantly switching styles.
A repository can be useful if you treat it as a record of your progress rather than a performance. Organizing exercises and small projects there makes it easy to review older work, see how your code improves, and return to ideas you’ve forgotten. Just make sure the repository supports your practice instead of becoming another task to maintain.
A structured approach worked well for me with programming textbooks. I would preview the introduction and summary, write down the main ideas, then work through the chapter examples myself. After that, I completed the exercises rather than just reading the solutions.
Notes are most useful when they capture concepts, questions, mistakes, or explanations in your own words. You don’t need to transcribe the documentation. Going back to foundational material occasionally is also valuable because ideas become clearer after you’ve gained more experience.

Would it be worthwhile to keep my practice exercises, notes, and small projects in a GitHub repository?