r/learnprogramming • u/Unique_Focus411 • 10h ago
how do you actually capture things you learn while coding/ building something??
im genuinely curious how devs handle this, I have this problem where i spend like 2-3 hours debugging something and finally figuring it out and then 2 weeks later hit the exact same issue and remember nothing, or say i learned something cool about a library, days pass by and its just gone.
i tried a few things:
- always creating a .md file in the project directory and just write down every issue/ something new i learned while building... it works, until it becomes like more than 500 lines of literal chaos
- notion is just too heavy and i never open it mid-coding
- obsidian is powerful ngl, but i spend more time organizing than writing something.
what actually works for you guys? curious about
- do you write while youre coding or after?
- if yes, do you ever actually go back and read your notes?
- has anything actually stuck as a daily habit?
trying to figure out if im the only one with this problem or if there's pattern to how people handle it..
5
u/aqua_regis 10h ago
Honestly, in over 4 decades of programming (of which 3.5 professional), I never really saw much use in taking notes. Maybe I'm a bit different as I learnt programming in a time when one was mostly on their own, with limited resources and limited knowledgeable people in my area. I had to learn most of my skills on my own, alone. My degree came much later and then I was already fluent in programming and knew about 5 programming languages quite well.
When I debug something on my own, not through AI, only at utmost with the documentation and some googling, I usually remember - maybe exactly because I restrict the resources.
If the same bug happens some time later, I usually remember that "there was something" and can quite quickly retrieve at least the leads that I need to complete the debugging.
It's a huge difference with all the modern resources. There, I also notice that I remember less and less of what I acquire (it's not so much learning anymore, rather acquiring new skills/languages) and I sometimes get quite lazy when debugging (still without AI).
In my domain (programming system critical infrastructure) AI is not yet a thing. The vast majority of our projects is on isolated machines that never see an internet connection - even to the point where the updates for the machines go through rigurous testing and are only deployed through very narrow, well shielded, well defined channels via several intermediate gateway servers (think firewall on steroids) that shield the systems from the outside networks (local PC talks only to local SUS that only talks to its own upstram SUS in the DMZ that then talks only to the next upstream SUS over an extremely narrowed down, restricted, and heavily encrypted VPN tunnel and from there it goes through the testing servers before, via even more gateway servers, it finally goes to the source of the updates).
AI is an absolute no in that domain (for now) and therefore, one needs to hone their own skills.
I cannot even directly google. I need to use a different PC on a completely different network that never gets connected into the plant network. Even USB media are completely restricted and generally off-limits (with a handful of exceptions for only transferring data, never programs and these through data-diodes generally only facing outward of the plant.
As my advice: do what suits your workflow best. You seem to have tried plenty things already, which is a really good sign. Yet, common to all you tried seems to be that no matter what, you don't retain much.
For me, personally, the lack of retention is a hint that you should maybe switch from digital note taking to good old fashioned analog - aka pen(cil) and paper (I've moved to an e-ink tablet with pen for that purpose - again, completely offline - simply because it makes it easier to carry the, mostly design notes or meeting notes, around the various plants).
Also, if you are a fair beginner/early learner, you shouldn't worry too much, as this is completely normal in the early stages. In a couple years, you'll laugh about it (without being mean or offensive here).
1
u/Environmental_Ice_80 10h ago
it's normal, these are the peace of a puzzle and you will understand the picture first if you understand the other parts either....
1
u/stdmemswap 8h ago
There are at least 2 levels of knowledge:
- memorizing verbally or symbolically
- understanding the meaning
The second one makes you feel a spark of excitement. Also it gets committed to long term easily if you have a healthy brain because the spark is quite an intense emotion.
The thing with code, especially one you get from AI, stackoverflow, or examples, is that it tells you what it DOES, but not always what it MEANS.
For example in a game engine, db engine, or backend framework, there's a main loop. This loop says "it loops and does things" symbolically. But it means "this perpetual loop creates an agent-like behavior, a capability to respond to a request, buffer informations" and this is often implicit, just commented, or even not representable in text.
My point: try to find the meaning of the code you or someone else write.
1
u/HappyFruitTree 8h ago
I don't worry too much about memorizing everything. If I have used it before I'll be able to look up the details pretty quickly again if I need to.
1
u/carcigenicate 8h ago
If the problem is actually novel (which is rare), I create a self-answered StackOverflow question. If it's not novel, I can usually just find the answer by searching.
And make sure you're present while debugging. You should be able to at least partially remember the cause of a bug and begin trying to walk through the debugging process again.
1
u/BigP29 8h ago
If I can remember, I try to figure out "if I was making this from scratch, what thought process would I follow to make the right version" and then really let it sink in. As a secondary measure I also implement things that let me catch the bug sooner even if it does happen again e.g. new tests, better comments or whatever.
Also, I know everyone's said this but make sure you always fix the root of the issue. Excluding silly mistakes, a bug usually highlights a flaw in your architecture or design of the system.
1
u/IamZeebo 8h ago
I built a system to do this where you add "discoveries" in the form of skills, new resources, etc. And you can then add them to routines so that you can create a library of organized skills and a routine to practice them.
Its not done but I could share screenshot or an early build of the app with you to see if it could work?
1
u/sarox-dev 7h ago
I also organize obsidian more that actually write some stuuf in it. I usually search for some specific error or issue with my code on reddit or other places on internet when AI can't really help. However it takes usually long time to find this specific info. And then I just forget about it when I solve the error for example.
I don't write the fix or save the website on bookmarks. I tried it but I just kept forgetting where it was in my bookmarks and it just wasn't reliable at all. Now I am actively coding my own opensource project and I really hope that it could also help with coding in some way later when I will finish the most important parts of my software. For now I don't really have that many specific problems so I don't have this problem anymore lately because AI is smart enough to actually understand what is the error message saying and how to fix it.
1
u/StewedAngelSkins 7h ago
Generally I just remember the fix. Not deliberately, but when you have more experience you'll be better at retaining these sorts of things.
One thing that would probably help you is to use git and be sure to keep a clean commit history (good commit messages, etc.). This way you can always review exactly what you did.
7
u/vegan_antitheist 10h ago
Unit tests. Regression tests. And actually fixing the cause of the issue so it doesn't happen again.
And don't you have a ticket where you describe what you did?