The "typing code out" is important. A lot of us learned just this way in the early 80s, because that was the only way we could get the source: buy a magazine or a book that taught, say, game programming in BASIC, and then type in code. The inevitable syntax errors made you spend time going back through to figure out what you did wrong, not to mention the time you spent actually looking at each line.
Downloading the code from a book's web site has nowhere near the same effect, even if it "feels" more efficient.