The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

393177 (1) [Avatar] Offline
#1
Hey there,
I have no idea about book writing, following is just based on my personal experience.

Recently bought the book and having fun with it so far. Just one thing about the Chapter 7 getJSON(...) examples, since it was my personal first "wall". It took me a long while (about an hour) to understand it, but when i finally realized it i was like "oh god no, this is brilliant, i am stupid". I didn't understand how the generator puts the result of a promise into a variable while "yielding" at the same time
var ninjas = yield getJSON(...)

At some point i switched my focus to the async function and like being hit by lighting i realized that it feeds the generator with the result of the last Promise resulting in a cycle.

Somewhere in the generators you throw an exception and say something like "Told you this will be useful". In this case a sentence like "Remember when we passed values to the Generator in <<InsertChapter>>?" would have helped, since, at least i think so, this is the critical point for the magic between Promises and Generators. The other critical point being, that a generator can be stopped, but you highlight that pretty often, so no problem there.

Best regards,
Jan

PS: Is this the kind of feedback you expect here? Furthermore i am reading the book on my Kindle Voyage, and sometimes the code formatting seems kind of odd. Do you care about that?

Josip Maras (30) [Avatar] Offline
#2
Hi Jan,

Yes, that's exactly the kind of feedback we are looking for and I agree with the comment.

The book is now in production, and I think we'll be able to squeeze in some information that will clarify this.

As for the formatting, this should be fixed in the final version of the book.

Thanks!