Disregarding the issue of AI for a moment, I don’t really think books were ever the ideal way to learn programming.
It’s so obviously better to learn programming in a web based medium. Not just for tutorials or code-running environments, but also for having up-to-date manuals and references for tooling as new releases come out.
Or, if you don’t like that, e-books are again vastly superior with the ability to search easily without flipping through indexes, copy/select text, etc.
Books become out of date so fast, and you live in a hell of manual transcription, which is not actually that helpful for learning despite being highly manual. I also remember dealing with typos and mistakes that were hard to fix as a new learner. Let’s hope someone sent a letter to the author and that the book sold well enough to get a second edition, which I’d then have to buy…but by then it was too late, I’d have moved on.
There was a huge bookshelf because there was no better option. Just like Blockbuster video, something far better came around.