My preferred way of doing it in the past has been printing out the code and writing notes alongside it in the margins but I've stopped doing that as it keeps wasting a lot of printer paper and ink.
I'm curious if anybody else has taken notes alongside code and how they are doing it, because I feel like there isn't a good way of doing it that I know of yet.
I've also tried using org-mode in Emacs and markdown but found that a lot of editors grey out the code making it harder to see, and the whole point is to see the code since I'm reading the code and it doesn't seem worth the effort to copy the file over to Emacs if it looks hideous. Also, I tried downloading the repository (written in C#) and opening it in Visual Studio in hopes to take notes in the form of code comments and I realized that it requires a lot of work and installations to even get the repo to compile and since I'm only wanting to read the code and take notes I don't want to go to that effort and without getting it to compile VS makes most of the code go red with bothersome error squiggles everywhere.
How do you take notes alongside code? Is there a good way out there that tailors to reading code and taking notes?