When I first a codebase, I frequently take notes about it, as this SO answer suggests.
If some code chunk is small enough, I copy-paste to Word, print it out, and make hand-written annotation. If the code is long, I write down the line number and my comments about that line of code.
This process works, but is woefully inefficient. First, everything is handwritten and tends to get lost over time. Second, I constantly to have go between my notebook and the codebase, looking up the code that the line number refers to.
Is there any better tool of methods of taking notes about a codebase? In my ideal world I should be able to add comments similar to comments in a Github pull request. But I'm also open to other methods.