Live data from Hacker News

Programming book authors: put all the code in the book

logicgrimoire.wordpress.com

31–40 of 83 posts

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

#31
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.

If programming books still came with CDs (or USB drives), we’d be reading blog posts complaining about that.

I can see the comments now: “Just put it on GitHub! Why do they put it on something physical that I’m just going to lose!?”

Retailers loathe books with extras (CDs, USB, or otherwise) because the rate of issues and problems with returns goes way up. Customers dislike it because they’ll lose the thing. Just put it on GitHub and call it a day.

I could understand some of these complaints if a certain publisher has gone out of business and all of their links were dead or something, but I can’t really get worked up about someone having to clone a repo from the internet to work with code. I’d much rather deal with that than I would keeping track of a physical thing that comes with a book, which I have to stick into my computer.

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

#32
post #25

Bugs emerge. Tools change. How do you update code printed in a book? If a book can be written in such that it does not need to change, then by all means, carefully proof and test all the code and hard code it into the book. But that's simply feasible in many cases. Better a book with some external resources than no book at all? (Oh, and let's set aside the cases where the links to external resources are done in a hor…

Print code in the book, and have a URL you can check for errata. That's how it always used to be done, anyway.

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

#33
post #21
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.

How long do CDs and DVDs last, anyway?

https://www.loc.gov/preservation/scientists/projects/cd-r_dv...

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

#34
post #22

Two things come to (my) mind. First, if the problem is broken URLs, does it make sense to try to fix that instead of not using them? Some odd blog is likely to (eventually) become ephemeral. What about Github links? How long will they last? That seems particularly appropriate for posting code examples. Are there other repositories on the Internet that can reasonably be expected to last? Second, extremes in either dir…

> That seems particularly appropriate for posting code examples. Github is a proprietary, closed-source service that makes no promises about keeping things for a long time. And even if they do, at the time convenient for them, they'll send out an email titled "We are changing our ToS", and users will just accept it. Doing infra work for researches I encounter so much dead and dysfunctional content on Github, it's a m…

> Github is a proprietary, closed-source service that makes no promises about keeping things for a long time.

GitHub doesn’t arbitrarily remove public repos for no reason.

GitHub is extremely unlikely to just disappear overnight.

If people aren’t willing to accept GitHub as a place to host public code in this thread, I think people are just looking for reasons to complain about things rather than looking for a practical solution.

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

#35
post #15

Earlier quoted context omitted.

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.

A book with a usb port on it to download data contained within the book would be so cyberpunk.

If we can have potato chips that play music[1], we can have a book with built in storage.

1. https://web.archive.org/web/20190516225905/https://www.billb...

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

#38

Earlier quoted context omitted.

> That seems particularly appropriate for posting code examples. Github is a proprietary, closed-source service that makes no promises about keeping things for a long time. And even if they do, at the time convenient for them, they'll send out an email titled "We are changing our ToS", and users will just accept it. Doing infra work for researches I encounter so much dead and dysfunctional content on Github, it's a m…

> Github is a proprietary, closed-source service that makes no promises about keeping things for a long time. GitHub doesn’t arbitrarily remove public repos for no reason. GitHub is extremely unlikely to just disappear overnight. If people aren’t willing to accept GitHub as a place to host public code in this thread, I think people are just looking for reasons to complain about things rather than looking for a practi…

https://news.ycombinator.com/item?id=39267200

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

#40
post #35
post #15

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.

A book with a usb port on it to download data contained within the book would be so cyberpunk. If we can have potato chips that play music[1], we can have a book with built in storage. 1. https://web.archive.org/web/20190516225905/https://www.billb...

It's taking me forever to upgrade all my dead tree books to usb-c, to be fair.
Post reply on HN