The normal case is that students should obtain a recommendation letter for graduate school from the professor under whom the student has performed research.
Currently, I am taking a course conducted by a field-famous professor, from whom I wish to obtain a recommendation letter for my grad school application. However, due to some reasons, I am not able to do research under him, which implies that our only connection is that course that I am currently taking.
If so, maybe one year later, he may refuse to write me a letter, because he does not know me well, or even has forgotten me. Even if he is willing to write me a letter, being not familiar with me, he may not be able to write a decent letter for me.
(By "decent", I mean a letter that actually can help. I know that as long as he is willing to write me one, he can simply say "the student obtained a good grade from my course". I don't think this kind of letter will actually help, IMHO.)
So besides obtaining a good grade for this course and frequently asking valuable questions, what can I do to impress him so that I can obtain a decent recommendation letter for my future grad school application? How to make him understand me better?