"Basic elementary concept, if you don't get this, you should not be coding yet."
The target audience of his book has just learned what a variable and an array is. Since the book as advertized as learning "the hard way," it seems to explicitly attempt to give an insight to what the computer is doing when you tell it to do something.
That is, I sure as hell could translate a for loop to psuedo-assembly, and I could probably teach a newbie how to do the same for their mental model. I don't even begin to think how I would teach them what the computer is doing conceptually.
The target audience of his book is not coding yet. What, should we require a comprehension and vocabulary test before they test something out in a REPL?
You can teach <array>.each { |<elem>| <code> } exactly as you would teach for <elem> in <array> do <code> end. The .each variant allows the student to discover a rich palette of correlations as he progresses, the for do end variant is a dead end he needs to forget sooner or later. As a student, I know precisely which variant I'd chose. Do you?
> There is a function "each" that applies to arrays. "Each", for each element in the array, binds "elem" to the element value, then executes the body of the code block. The code applies "each" to array "arr" and executes "puts elem" for each element.
The target audience of his book has just learned what a variable and an array is. Since the book as advertized as learning "the hard way," it seems to explicitly attempt to give an insight to what the computer is doing when you tell it to do something.
That is, I sure as hell could translate a for loop to psuedo-assembly, and I could probably teach a newbie how to do the same for their mental model. I don't even begin to think how I would teach them what the computer is doing conceptually.
The target audience of his book is not coding yet. What, should we require a comprehension and vocabulary test before they test something out in a REPL?
As such, I would say Zed's pedagogy is sound.