I still learn to code from books. Something about reading the code, retyping it, looking at it on the page. It gets glued into my mind in a way that I can actually retain and recall it.
You learn NOTHING from copy pasting stackoverflow. I always look and retype or actually figure out what’s happening. Otherwise I won’t be able to solve problems, just put bandaids on them.
I sometimes copy/paste from SO, especially with new languages. If it works (which is not always the case), it is a great opportunity to learn something on a real example tailored to your needs that you understand.
You learn NOTHING from copy pasting stackoverflow. I always look and retype or actually figure out what’s happening. Otherwise I won’t be able to solve problems, just put bandaids on them.