Earlier quoted context omitted.
Absolutely disagree. I personally learned (as I think many people did) by copying code out of books. Whenever something went wrong, I had to figure out whether it was my typo or the book's typo or my conceptual error or the book's conceptual error. That process helped me to learn a lot, and quickly. If everything went perfect, I got to play some creative game which I loved and gave me a sense of acheivement that help…
I think there's a large difference between copy-paste and what you're describing (which I'll dub 'manual transcription'). I have no formal training in learning or cognition, but I do have quite a bit of personal, anecdotal evidence to suggest that manual transcription is far more useful, from a pedagogical standpoint, than straight copy-paste. Rather than take a boring example from my programming career I'd rather dr…
I personally write a lot. I certainly find it useful to do that.
However, I would not normally recommend Zed Shaw "Learn Code the Hard Way" type of method of writing out over and over again. I think it probably works and you can do it yourself, but I think it's quite inefficient. I don't need to type 10 PRINT "HELLO" 20 GOTO 10 more than once to get a good sense of what's going on.
I think you most of all benefit here from the time you're forced to put in. If you can understand nothing, there's really no other sensible thing that allows you to concentrate for the time you need to make decent progress.
However, I don't think this means transcription is pedagogically ideal. IMHO building something for yourself is more effective; getting expert tuition is more effective: in terms of time spent vs benefit received.