I keep running into the same problem: I'll spend two or three hours debugging an issue, finally understand the cause, and then completely forget the solution a couple of weeks later. The same happens when I learn something useful about a library or framework—if I don't use it again soon, the knowledge disappears.
I've tried keeping a Markdown file in each project, but it eventually turns into hundreds of lines of unorganized notes. Notion feels too heavy to open while coding, and although Obsidian is powerful, I find myself organizing it more than actually writing anything.
What works for you? Do you take notes while coding or afterward? Do you ever revisit them, and have you managed to turn the process into a sustainable daily habit?
5 Answers
The most useful notes I’ve kept are postmortems for genuinely tricky or recurring issues. Write down what happened, the root cause, how you diagnosed it, and what change prevents it from happening again. That’s more valuable than recording every small thing, and it scales much better when working on a team.
I don’t try to memorize every detail. With experience, you usually remember that you’ve seen a problem before and can reconstruct the debugging path or find the exact documentation more quickly. When you do take notes, keep them short and searchable instead of trying to maintain a perfectly organized knowledge base. A brief problem, cause, and fix is usually enough.
For debugging problems, turn the solution into something executable whenever possible: add a unit test or regression test that would have caught the bug, then fix the underlying cause. Good commit messages and a clean Git history also give you a searchable record of what changed and why. Tests often become better documentation than a separate notes file.
That makes sense. A test would both preserve the lesson and stop the same bug from quietly coming back.
For facts or APIs that you truly need to remember, turn only the important ones into spaced-repetition cards. For everything else, use a plain text or AsciiDoc folder with small files and searchable headings. Don’t spend time building a complicated system; the best setup is the one you’ll actually open while working.
If digital note-taking never sticks, try writing by hand or using a simple offline tablet. The physical act can help with retention, especially for design decisions and debugging thought processes. I’d also focus on understanding what the code means rather than only copying what it does—knowing the reasoning makes the lesson much easier to recall.

Agreed. Beginners often take notes on everything, but focused postmortems tend to remain useful long after the rest becomes clutter.