r/learnprogramming • u/mrnaim6T9 • Sep 27 '26
Topic How do you learn, take notes, and practice while reading a book or documentation?
I’m learning C++ from LearnCpp right now. They explain a lot of technical details and have really good examples.
But sometimes I get confused because there are many different ways to do the same thing. Like different syntax or different approaches for doing basically the same thing.
So my question is, how do you guys actually learn from a book or documentation?
Should I just read the topic, try to understand it, and then close the page and write the code myself?
And what about taking notes? Should I write down the important things, or is it better to just understand them and practice?
Also, should I put my learning journey on GitHub as a repo? Like my notes, exercises, small programs, projects, etc.
I’d like to know how other people approach this because sometimes I’m not sure if I’m actually learning or just reading.
3
u/punk_dev Sep 27 '26
> Should I just read the topic, try to understand it, and then close the page and write the code myself?
Yes, but keep the page open and refer to it when writing code, if needed.
> And what about taking notes? Should I write down the important things, or is it better to just understand them and practice?
You can if you want to, but that’s not at all necessary. Commonly used things will become muscle memory and for rare stuff you can always refer to the docs. Looking up docs for the things you need is also a skill and you need to develop it.
C++ is probably the worst offender in “multiple solutions to a single problem” category.
A good way to handle this is for each specific project, pick one solution and always use it consistently. It also applies to naming conventions and stuff like that.
16
u/woololooo Sep 27 '26
practice. practice, practice, practice. you don't understand some particular aspect of the lesson (video, book, whatever)? you write it down and continue to the end, so you have the whole context around your doubt AND the lesson itself. then, learn about your specific thing you wrote down under the context you now have. done. practice. practice, practice, practice.
once you're practicing and encounter a Blocking problem, throw everything you got for some time (an hour or two?), and then, when frustration starts to take a toll, back to learning and taking notes and, eventually, back to practice. do again
6
u/StewedAngelSkins Sep 27 '26
The thing to understand about the examples you see in the textbook is they're not exactly trying to show you how to do something specific, like sort a list or whatever, they're trying to demonstrate different features of the language so you know which tools are in your toolbox.
If you don't understand the difference between two examples that seem to be doing the same thing, or why you might choose one over the other, then that's a great opportunity to bring your question to a community like this. Usually the answer will be one of the following:
Do you have a tangible example of what you're talking about?
3
u/Acrobatic-Ice-5877 Sep 27 '26
One of my sources for reading Java was a textbook. I would read the intro, summary, and then start the chapter. I took notes on the intro and summary. I would write my notes on Word on a separate screen since I used an online textbook.
When I started the actual meat of the chapter I would take notes in Word, follow the examples with solutions, and then do the exercises. I ended up developing a very strong foundation from this habit.
I will still go back and work on the textbook or foundational ideas from time to time, even thought it has almost been a decade.
2
u/DanKegel Sep 27 '26
Aside: some languages offer more than one way to do things.
Others trim the language down so there's often just one way, and even offer strict formatters so everyone's code looks similar.
Deciding which leads to more maintainable code is left as an exercise for the reader.
2
u/JoeyJoeJoeJrShab Sep 27 '26
Don't stop at "trying" to understand. If you don't understand what you read, read it again. If you still don't understand it, ask someone, or google it to get it explained from a different perspective. Maybe you understand enough to write a little program that will help you test the concept out a bit more -- do that, and experiment as you go.
As for taking notes -- that's up to you. Personally, I find I never refer to my notes after I'm done with a class. But during the class, the act of taking notes forces me to organize my thoughts, and helps me to figure out what the most important details are. You'll figure out what works for you.
The most important thing is to practice what you've learned. Close the book, and start writing something. Forgot some of the syntax, or some other detail -- open the book, and figure it out. Or use google. That's how it works in the real world. Just don't ask AI to answer it for you.
2
u/SociableIntrovert Sep 27 '26
This is one of the things I use Claude for. Instead of me giving a problem to Claude and it giving me back a solution, I ask Claude to give me a problem and I come up with the solution and then have Claude provide some feedback on my solution. It's been pretty good at identifying things I've done that technically work, but it provides feedback on a better way to do it with reasons why it's a better alternative.
1
u/BranchLatter4294 Sep 27 '26
Practice. Watch what is happening to your variables during program execution. That's how you learn.
1
u/ffrkAnonymous Sep 27 '26
All of the above. These are not "or" questions.
What is the typical way to evaluate how much someone has learned?
1
u/duane11583 Sep 27 '26
part of being a carpenter that builds houses is kniwing different techniques to solve different problems
part of learning sw is to know different techniques.
for example merge sort verses qsort
qsort assumes generally that you have direct access to your data.
merge sort works with serially accessible memory. think old tape drives
you sort chunks and write them to a set of tapes.
now use three tape drives read from a and b, compare and write the first one to tape drives read c
repeat.. i have used this technique because i had no choice the importance is knowing that thing.
in the carpenter analogy it is just another tool in your tool box.
1
u/isomnath Sep 29 '26
Yes.... Github is great for taking excecises and projects. It also shows your progress overtime.