Earlier quoted context omitted.
A cheap USB drive sells for under $10 and you can seal a book in plastic so I'd imagine it'd be feasible to just add the $5-$10 to the price of the book. People who buy books, especially programming books, generally aren't very price sensitive anyway.
Can we attach an attack vector to the book cover? Sure. I wouldn't let that USB anywhere near my computer if I'd bought it let alone a library copy of it. I'm with the author on this one. Any code needed to for it be useful should be printed in the book (perhaps complete code in an appendix rather than right there in the chapter). That said I haven't bought a programming book in years.
But well, the trend has been to consolidate anyway. Now even power comes through an universal interface, so you can't use power outlets in places that you don't trust.