The code from the book, chapter by chapter