I am an undergraduate student and. I have been facing a difficulty with my studies for quite some time. I hope you wouldn't mind sparing a few minutes to advise me on this matter.
The problem is that whenever I read my lecture notes or a textbook or a labscript, I tend to question every single sentence in every paragraph. Also, I spend a lot of time trying to restructure the notes (by rewriting them again) so that the arguments flow smoothly and so that all the assumptions have been taken into account. This becomes a laborious task. As an example, here is an extract from a computing labscript.
Create another project workspace called section4. From the course website, copy the file fourvector.h. This file will look as shown in Figure 6. Notice the mechanism in fourvector.h by which we specify the derived class inherits from the base class: class fourvector : public threevector. Notice that we need to #include the threevector.h file in fourvector.h so that the compiler knows about it when it reads the inheritance statement; this is why threevector.h is not needed in the main program (see Figure 7). Since the fourvector class inherits from the threevector class, then when we make a fourvector object, we are also making a threevector object implicitly at the same time. Hence, we have to specify the threevector constructor as part of the fourvector constructor. There are three constructors in the fourvector class and each calls the appropriate constructor from the base class using the notation: fourvector(...) : threevector(...).
For a start, I'd focus on every single word of the first sentence. I'd ponder on them until I have formed some visual equivalent of every single word. (This could take a few minutes.) Having done that, I will have been satisfied that I understand everything implied by the first sentence. Then, I'd on to move to the second sentence and repeat. During that process, I'd resructure the paragraph to remove redundant words and to make the arguments flow smoothly. This is what I would have ended up with.
To specify that the derived class inherits from the base class,
use the mechanism class fourvector : public threevector in fourvector.h.
When the compiler reads the inheritance statement,
it must know about threevector.h.
So, #include the threevector.h file in fourvector.h.
So, do not #include the threevector.h file in the main program.
The fourvector class inherits from the threevector class,
so when we make a fourvector object,
we are making a threevector object implicitly.
So, specify the threevector constructor as part of the fourvector constructor.
There are three constructors in the fourvector class.
Each calls the appropriate constructor from the base class using the notation: fourvector(...) : threevector(...).
And this is only the beginning. After I have finished analysing the entire section, I'd play around with the code until I have understood the motivation behind every single line. I would try to deduce from first principles the motivation and implementation of a class. So, I'd start off with int main(void){} and then add in more and more code. I do this so that I can have a complete understanding of the concepts of the course. I fear I might be asked questions in the script (during the interview) that rely on my excellent understanding of the concepts in the text. I am not a genius, so I can answer those questions only if I have generalised and unified (as above) the different parts of the code.
I don't know if my way of studying is utterly flawed or if this is the way to go forward. I am asking this question because this process eats up a lot of my time. Please enlighten me.