Agreed. I wish more books would adopt this strategy: "Ok, stop. To move forward with the application we will need code that does X, Y, and Z. Here is the spec that I want you to code for the next step. Work on it for a bit. If you're having trouble check out our forum for other people's attempts at a response and you can see 10 ways to solve the problem. On the next page you will see the code answer and the book will continue with an explanation of the code."
Even as a beginner you can tackle small snippets of code using the basic control structures.
>Even as a beginner you can tackle small snippets of code using the basic control structures.
Sadly, this is how programming books used to be written. Case in point: about a decade ago in high school we learned programming from a book called C by example. It had a handful of well thought out programming exercises after every section. A few years later I went looking for the book to give to a friend who was starting out. Lo and behold, in an updated version the exercises were all removed! It's mind-boggling that somehow the publisher thought removing the exercises was adding value to the book. Perhaps your average reader feels exercises makes a book seem too technical, so they skip it for the Learn X in Y hours style books? Nowadays you can't find good programming exercises outside of a dry textbook.
Even as a beginner you can tackle small snippets of code using the basic control structures.