News for hackers. Stuff that matters.
Re:Ask HN: How do you maintain personal annotations for code... by layer8 on Thursday December 26, 2024 @10:06AM (#42515628)
> Separate markdown files (hard to maintain precise code references)

That shouldn’t be difficult. Most code repository systems support links to exact line numbers in specific commits, for example like [0]. Even in the event that the links stop working, you can still identify the commit hash, file name and line number from the URL.

[0] https://github.com/curl/curl/blob/3b057d4b7a7e6b811245fd0312...

Re:Ask HN: How do you maintain personal annotations for code... by infamousblah on Friday December 27, 2024 @07:49AM (#42521713)
This is my approach as well. I write a doc to myself with commit+line links for code, relevant snippets from documentation linked to the source, and annotated screenshots where that makes more sense, also linked if the source is web based.