I would like to hear your way and mindset about approaches or tools to learn various C++ libraries.
surely not everybody learns the same way (I'll share mine later), I'm sure there is valuable information which you can share to help improve the way to most effectively learn.
Let me first describe my problem:
Often learning code that somebody else wrote, I'm faced with so much frustration I just can't put the amount of frustration here into this post.
I usually first google out what is "the best library" for specific purpose.
Then often I just give up from "the best" and go explore alternative libraries, reason being search for better documentation as No1 or better looking/more modern/standard compatible code as No2.
then of course often there is no better library or better documentation, so I usually go back again and continue learn previous library because that's what according to google and other people opinions is *the best library*.
I don't want to criticize any library and it's documentation, but you will agree with me that only a small amount of libraries have good documentation.
now here is my way to learn code, (the question I often asked myself)
How do people learn huge code bases knowing that documentation does not cover all the code (or documentation is horrible)? Just *HOW*?
I come to conclusion long time ago that reading the actual code line by line is the way to go, although it's the hardest way.
Thankfully IDE can help you out by using "goto definition" and similar IDE tools.
also some of the code bases have good code comments, which are awesome way to speed this process up, usually there is no need for documentation in that case.
But problem remains the same as with online documentation and that is there very few libraries that have good code comments.
I see a lot of developers are against over commenting code, some will say:
1. comments are obstacle
2. or even that there is no time for comments
3. or even worse: if you don't understand the code you should not be using it. |
I just can't believe majority would say that, then how the heck do you learn?
is reading code line by line, like if you're compiler truly the only way?
Another approach in addition to reading the code I use is this:
I have about 10K bookmarks in my browser, when I need some info that I was previously over but forgot detail I just go search my bookmarks, quick and effective.
otherwise google is your best friend, but yes googling out takes time, especially if library does not have big community. same applies to forums.
btw, I consider forums and mailing list to be way to slow for my learning pace.
Your tools
What are your techniques to learn? what tools you use?
what is you main weapon? (ie. mailing list, forums, google, IDE tools, team work, code samples, existing projects etc..)