Live data from Hacker News

Programming book authors: put all the code in the book

logicgrimoire.wordpress.com

11–20 of 83 posts

Re: Programming book authors: put all the code in the book

#11
post #8

Just glue an envelope with a CD to the backcover, this is what people were doing before your fancy internets became a thing. But really, if you a writing a book on a modern language, and your code has external dependencies, chances are it will not build 5 years forward, even if there are no URLs directly in the book.

Is it feasible to attach a usb drive to a book these days?

[deleted]

Re: Programming book authors: put all the code in the book

#13

"printed in the book itself, so the reader can type it in" An anachronism from before the current era, when you can take a picture of text with your phone and tell ChatGPT "transcribe this".

I think the point is to get certain understanding while typing. It is about being in the learning process, not just about retrieving the code.

Re: Programming book authors: put all the code in the book

#14
post #8

Just glue an envelope with a CD to the backcover, this is what people were doing before your fancy internets became a thing. But really, if you a writing a book on a modern language, and your code has external dependencies, chances are it will not build 5 years forward, even if there are no URLs directly in the book.

Very few computers have a cd/dvd drive anymore.

Re: Programming book authors: put all the code in the book

#15
post #8

Just glue an envelope with a CD to the backcover, this is what people were doing before your fancy internets became a thing. But really, if you a writing a book on a modern language, and your code has external dependencies, chances are it will not build 5 years forward, even if there are no URLs directly in the book.

Is it feasible to attach a usb drive to a book these days?

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.

Re: Programming book authors: put all the code in the book

#16

"printed in the book itself, so the reader can type it in" An anachronism from before the current era, when you can take a picture of text with your phone and tell ChatGPT "transcribe this".

Does that actually work? My experience with various photo OCR tools was not working except under optimal conditions.

Re: Programming book authors: put all the code in the book

#19
I agree that urls for this sort of thing are unreliable and there is some merit in requiring the reader to type the code in manually but how about putting an outrageously complex QR code in the book that you can scan to get a copy of whatever function or class the author is trying to demonstrate?

Re: Programming book authors: put all the code in the book

#20
post #8

Just glue an envelope with a CD to the backcover, this is what people were doing before your fancy internets became a thing. But really, if you a writing a book on a modern language, and your code has external dependencies, chances are it will not build 5 years forward, even if there are no URLs directly in the book.

Is it feasible to attach a usb drive to a book these days?

How about Micro SD?
Post reply on HN