Code and miscellany for my new book