in reply to Fair Use When Referring to Book Answers?

Whatever exactly "fair use" covers, it certainly covers using short bits of sample code to illustrate a concept. Like redmist (or maybe not? =) I sort of cut and pasted an answer to a question (and was, IMO, inexplicably rewarded heavily in XP for doing so) out of the Ram book (my code differed in that I used $pwd instead of $password). Sure there's more than one way to do it, but in this case it was a *three line* snippet, using the functions provided by a module. Doubtless Messrs. Christiansen and Torkington (the authors of that book) would have given the same answer gratis as well. It might even be hard to argue that something that simple counts as *intellectual property* if IP laws are anything like patent laws (the answer is kind of obvious, once you know of the existence of the module). There aren't too many different ways to do it in a way that gets at what's *essential* in this particular case, and (as has also been mentioned here), by explicitly citing the book you do emphasize (a) the provenance of the concept and (b) the value of the book.

In all likelihood (I haven't checked) the same example, or something close to it, occurs in the documentation for that module.

Of course, I've been in an academic setting for a while, where we're *always* citing other people and that's pretty much all that "fair use" demands. I tend to view reproducing *snippets* of code, of the size and simplicity involved in this particular case, as not at all a big deal as long as the source is acknowledged. Now, had I reproduced somebody's published algorithm for cracking RC5 without brute force, that would be another matter =)

Not that my opinion matters, I suppose, to the copyright lawyers and judges...

Philosophy can be made out of anything. Or less -- Jerry A. Fodor