In her opinion piece published in The New York Times 2021-07-18, Linda Kinstler, a writer
Learning a new technology is an uphill task, especially if it was a programming subject. There are programmers who are able to write codes like how a native English speaker would converse in English. The codes would flow out so naturally.
In order to write good codes, it is important to know the programming language well. It is also useful if the person has good memory, because there are many syntax and rules to adhere to. And the person has to be creative, in order to come up with solutions to tackle a tough problem. Sometimes the term hacking is used to describe using some out-of-ordinary ways to achieve something.
I must say I may not have all the talents a "star" programmer has. But I have learned a few tricks to speed up learning (to code). Such as writing notes to accompany the video lessons. Sometime it could just mean doing the transcribing. Adding your own notes facilitates quick search into sample codes, as well having documented the changes made to a program and the reasons for the change.
And it overcomes the shortfall in not having good memory, because the notes are the memory, and it helps you to quickly get up to speed even after you have put down the subject for a while.
Might take more efforts to do it, but as the Chinese saying goes "勤能补拙" (roughly translated as "overcome weaknesses with more practices") - will get us to finally become a programmer.