Re: "Borrowing" code
I'm curious to know the legalities involved in "borrowing" code without
paying for it.
It depends entirely on the license for that code.
Let me clarify. Let's say that I find some code snippets or even entire
classes, displayed on websites and that it would save me time and money
to use those classes in my own projects. This web site, www.java2s.com,
is just one of many such web sites on the Internet, as is the Java
Tutorial at the Oracle website.
Can you spell "plagiarism"? How about "lawsuit"?
Assuming I make no claim that I am the author (by leaving the @author
Javadoc tag empty), am I "stealing" this code? What if I cite the author
Yes, if you violate the license it's still stealing (and no quotes around it, either - putting quotes around "stealing" doesn't make the act more ethical).
"@author" Javadoc tags have nothing at all whatsoever to do with claiming
name in the @author tag (or the URL of the webpage in a comment if the
author's name isn't present in the code)? Or would I have to get written
permission of the author or website to use the code? Or even obtain a
licence before I can use the code?
You obtain a license in accordance with the terms of the license. Copyright
inheres upon authorship, at least in U.S. law, and thus you are obligated to
respect it regardless of source. Each program is released under different
terms; you must respect the terms on a case-by-case basis or you're liable.
Code published in web pages or newsgroup posts "feels" as if it should be
in the public domain but I think that's just wishful thinking on my part.
Yes, that's true. "Feels" is not a legal basis (nor an engineering one, unless
your professional intuition is very well honed) for action.
Given that you can look at it without paying anyone for that privilege,
and copy it into your own IDE and try it, etc. it feels as if it is there
There's that "feels" again. Tsk, tsk.
to be used. But as I understand it, those who create written works,
whether books or programs, are their owners (unless in the employ of
others) and retain copyright on this work, a copyright that typically
lasts for the developer's life plus 70 years.
The term depends on the jurisdiction, the work, when and how it was published,
and whether it was done for hire, anonymously, pseudonymously, or otherwise.
If copyright does apply to all these snippets and example classes, would
I be able to bypass copyright by modifying the code in some small way -
maybe just with some comments or different variable names - or would that
be the equivalent of painting a stolen car: it doesn't negate the fact
that it's stolen and just tries to make it less obvious?
Why are you so anxious to bypass copyright? Are you a criminal?
I've been banging my head against a wall for a while on a couple of
classes my project needs and I have found two perfectly good classes that
meet my needs so I'd like to use them rather than put still more time
into making my own classes work satisfactorily. I'd like to figure out
what I can do to use the clases I found without having to look over my
shoulder (or fight my conscience) on the question of "stealing" this
If you're doing this in an academic environment, you should be worried about
the rules for plagiarism, not the rules for copyright.
If you're doing this in a commercial environment, don't take risks. The entire
tenor of your post is that of someone trying to skirt the rules. Bad boy!
If you're doing this for a review or satire, or for personal use, then "fair
use" doctrine applies. Just don't go beyond fair-use boundaries.
BTW, asking a bunch of software guys for legal advice is absolutely a winning
formula. Make sure to ask taxi drivers for medical advice and supermarket
cashiers where to invest as well. After all, many taxi drivers are pre-med
majors, and some cashiers are studying for their MBAs. Heck, I've met
supermarket cashiers who were attorneys. One-stop shopping - bread, milk,
cigarettes, investment advice and legal counsel. Did you remember your courtesy
card for the discount?