Chris Adamson has written a really interesting blog post at O’Reilly (and at Java.net) about the licensing of code in books and also online web articles.
Eric Meyer has also added an interesting discussion on the topic, titled Code Constraints.
The discussion looks at the extent in which the licensing of code is allowed to be copied and duplicated, and where copy and paste is regarded as a copyright infringement. Do readers and publishers have different viewpoints?