My first contact with writing code was probably on the C64, and later with BASIC on a Windows machine. After that, I've had occasional contact with code, mostly through simple tutorials, where I quickly lacked the necessary background knowledge and lost interest.
These days, I approach it all in a more structured way. When I want to learn a language, I look for various resources, starting with the absolute beginner level and working my way up, and then build my own small knowledge base for that language (Markdown together with the tool "ekphos" is currently my method). Every major language now has good online documentation (which is usually more up-to-date than books on the subject). Once the foundation is in place, I read, experiment, and note down everything I consider important, especially recurring elements like loops and the like. This way, it all gradually accumulates and becomes internalized.
I think the most important thing is to do it regularly. Every time I've been away from the topic for a while, I basically have to start all over again - but that could also be due to the way my brain works
