Live data from Hacker News

Programming book authors: put all the code in the book

logicgrimoire.wordpress.com

81–83 of 83 posts

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

#81
post #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.

I have tried it on just one book and a few screenshots. I tried it on your comment just now and it timed out. Sorry!

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

#82
post #67

Earlier quoted context omitted.

I think you confused printed pixels with camera pixels along the way.

I explicitly talked about the best case scenario, which would have been "one camera pixel is able to retrieve precisely the information of one printed pixel (or several printed pixels that act as one)" From there, I simply listed sources of error that would make it worse and words. The only place I could see conflation occurring is when I wrote about "sub 0.1mm" which indeed refers to the printed thing, and correspon…

The dithering in the page pixels don't limit the amount of information you can get through your camera pixels.

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

#83
post #66
post #50

Earlier quoted context omitted.

this is a fully general criticism of printing anything in a book; it's not an argument against printing code in books, but against books themselves

I really don't think you read and understood my post. I thought I made it clear, but I'll try again: There are two cases. One, where a book can be written in a self-contained manner, without urls to external resources. As you can see, I am happy with this case (which means you really can't conclude I'm criticizing printing thins in a book.) And another case where it isn't feasible to write the book in a self-containe…

it's possible that you didn't understand my counterargument, since your clarification isn't relevant to it

this logic doesn't draw any distinction between code and natural-language text; it's true that it's a somewhat restricted argument against printing things in books, because it doesn't argue against printing 'self-contained' things that 'don't need to change' in books. but it's an argument against printing natural-language text in books to exactly the same extent that it's an argument against printing code in books

ironically, it works much better as an argument against printing urls in books than as an argument against printing code in books. c or c++ or java or perl or javascript printed 25 years ago still works fine, but most urls from 2 years ago are already broken. natural-language text written about the c++ or javascript code 25 years ago is somewhat more likely to have become incorrect than the code is

python is an exception here, since it's been taken over by the sort of fashionistas who wouldn't be caught dead wearing last season's standard library, and are actively taking steps to sabotage backward compatibility

Post reply on HN