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


In reply to Re: Fair Use When Referring to Book Answers? by arturo
in thread Fair Use When Referring to Book Answers? by Guildenstern

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.