News for hackers. Stuff that matters.
Re:Local Variables by bibyte on Monday March 25, 2019 @08:09AM (#19481811)
> Type by hand his source code following along and trying to comprehend the details?

Isn't that the only way to learn from any programming book ? At least that's what I have always done. I am curious as to what other way people learn.

Re:Local Variables by rhizome31 on Monday March 25, 2019 @09:25AM (#19482223)
I tend to read a section carefully, then close the book and try to reproduce the example without looking at it again. Of course I'll allow myself to use online reference material, as I do in real-life programming. If I really get stuck I'll take a look at the book, but just enough to unstuck me. The goal is obviously not to reproduce the example line by line but to reproduce what it does with the same global structure.
Re:Local Variables by dahfizz on Monday March 25, 2019 @08:56AM (#19482045)
I've found that it's easy to zone out if I'm just typing exactly what's on the page in front of me. Following along but in a different language can keep you more engaged and think more about what's going on.
Re:Local Variables by imAsking9836 on Monday March 25, 2019 @09:31AM (#19482252)
It also becomes a bit of a battle against the desire of copying/pasting the code (It's even more tempting since it's an e-book with the code already formatted), not to mention that some parts are tedious to type like enumerators with many string elements
Re:Local Variables by bibyte on Monday March 25, 2019 @11:46AM (#19483552)
That's a good point. I also have a problem with zoning out when reading technical books. I should give your technique a try.
Re:Local Variables by marmaduke on Monday March 25, 2019 @02:02PM (#19484926)
I unconsciously change variable names when typing code samples which later forces me to track data flow and dependencies