After the first few examples presented in the book, the snippets shown (which is exactly what they are) do not work if you are trying to learn alongside. Instead, the examples show you what the result would be if you knew what you were doing already.
It started out to be a great book and went downhill very quickly. The author keeps the text interesting, but does not provide the overall picture of the examples at hand. Unfortunately, I feel I wasted my money on this book and will have to find another resource.