When I was learning to code at college, by myself (I did a Business degree), I bought a book on iOS development[0]. This book mandated that you type all the examples out line-by-line. I thought the idea was a pretty silly one, but I stuck with it because I didn't know what I was doing and wanted to learn.
14 years later, as a software engineer, I still think about that book and the way I can trace back a lot of my initial improvements to its requirement that code got written line-by-line. I still maintain the habit of rote text copying as a way to pick up new tools and commands (i.e. copying documentation examples exactly into my editor), and also when people make an assertion like:
> It's like trying to retype calculus solutions — you don't learn from it.
Maybe not everyone learns that way, but I sure did!
[0] - https://www.amazon.co.uk/iPhone-iPad-Apps-Absolute-Beginners...
Very much similar experience to yourself, when I was learning from YouTube tutorials I refused to copy/paste from their repos and instead typed everything out. Maybe changing variable names or structure.
I can definitely say it helped me learn a lot more than just blindly copy/pasting everything over.
> When I was learning to code at college, by myself (I did a Business degree), I bought a book on iOS development[0]. This book mandated that you type all the examples out line-by-line. I thought the idea was a pretty silly one, but I stuck with it because I didn't know what I was doing and wanted to learn.
It seems like an exercise to force you to attend to the details. I had a similar experience with a "certified X programmer" exam my employer bought for me. I wouldn't say passing such an exam makes anyone a good programmer, but it was an unexpectedly valuable experience because it forced me to attend to a broad set of details (instead of getting a spotty command of them, due to path-dependent experience).
Similar thing happens with notes: I rarely reference them but taking them keeps my mind from wandering.
I like coding katas (or even trying leetcode problems) when learning new languages.