

Ask YC: Can a site copyright their Javascript source code? - samson

I came across some code today that I wanted to see how it worked, and even though majority of it is open source, some of it is their own and is copyrighted.<p>Decided to check out their terms of use<p>"RECOMMENDED READING grants you a limited, personal, non-exclusive and non-transferable license to use and to display and to make one copy of the Materials and to use the services, this Site solely for your personal use. Except for the license set forth in the preceding sentence above, you acknowledge and agree that you have no right to modify, edit, copy(ok), reproduce(ok), create derivative works of, reverse engineer(didn't know that), alter, enhance (also didn't know that) or in any way exploit any of the Materials in any manner. This limited license terminates automatically, without notice to you, if you breach any of these Terms. Upon termination of this limited license, you agree to immediately destroy any downloaded or printed Materials. Except as stated herein, you acknowledge that you have no right, title or interest in or to this Site, any Materials."<p>This is Mixx terms of use. 
This question doesn't apply to them alone, but to all sites.I'm just wanted to know if copyrighting JS code is a normal thing.
======
midnightmonster
Any creative work is protected by copyright from the moment it is fixed in
some medium (e.g., written on a napkin, saved to a computer file). JavaScript
source code is no exception.

Using GPL code doesn't make my code GPL. If I violate the GPL by failing to
license my derivative work under the GPL, I lose my limited (GPL) license to
the original work and the original copyright holder can sue me. I am in
violation of copyright, but I can fix the violation by ceasing to use GPL
materials, withdrawing my derivative work from publication and/or paying
damages to the copyright holder as a court may decide--I don't automatically
subject my code to the GPL.

The legitimacy of "browse-wrap" license agreements itself is doubtful, and
many license agreements are full of possibly unenforceable clauses. At a
glance, this license would appear to forbid one person from visiting the site
on two different computers or with two web browsers, since each cache would
likely contain a separate copy of the code, and though IANAL I doubt that
would hold up in court. More broadly, courts have sometimes held that the
first sale doctrine (i.e., if you buy something, the vendor can't prevent you
from selling it to someone else if you like) applies even when license
agreements attempt to restrict resale (not very relevant here), and reverse
engineering is also often considered legal whether the copyright holder likes
it or not. See
<[http://www.chillingeffects.org/reverse/faq.cgi>](http://www.chillingeffects.org/reverse/faq.cgi>).

The fact that JavaScript is distributed in source form, however, makes it
harder to defend whatever you do as reverse engineering rather than just
copying or creating a derivative work. It seems to me that "black box" reverse
engineering is nearly always protected, but "white box" reverse engineering
treads a fine line, and in most cases trying to work with someone's JavaScript
would be a very, very white box.

OTOH, it's very easy to glean techniques from reading the code and apply them
in ways that are unlikely to be infringing and extremely unlikely to be
provably infringing. There are only so many techniques, and if you're not
outright copying an implementation it's very likely that any given idiom is
already common knowledge and/or available from a more friendly source. This
probably goes without saying, but anything that could be done by a script or
rule, such as variable name substitution or changing indentation conventions,
would only produce a derivative work and wouldn't be considered original. Not
that that's the limit of derivative works. Almost anything that could
reasonably be regarded as a transformation or modification of the original
code would probably still be a derivative work, even if it requires some
creativity. Analogously, there are only so many pleasing chord progressions,
so you have a lot of latitude in composing your own songs, but you can't
actually distribute your own recording of Sgt. Pepper without permission--even
if you change some lines and add a verse.

Runtime "enhancements" like Greasemonkey scripts or Mac OS input manager hacks
are (AFAICT) completely untested in court. It is my completely unprofessional
opinion that the spirit of the first sale doctrine (since you can generally
dispose of your legitimate copy of a copyrighted work as you see fit) and the
general esteem in which black box reverse engineering is held (such
enhancements often don't require extensive knowledge of the inner workings of
the code they enhance) bode well for the legality of [some kinds of]
enhancements--whether the copyright holder likes it or not.

------
pg
Copyright, yes. This "license agreement" is another matter, and seems
dubiously enforceable.

------
cduan
IANAL (yet), but here's what I think the answer is.

1\. Yes, it's copyrightable, just like anything else that is written.

2\. But if they took any of that JS from something else that was GPL'd, then
technically their JS is GPL'd too. (Assuming the GPL is enforcible.)

3\. Nothing stops you from reading their code and rewriting it yourself, so
long as you don't just copy. Copyright extends to "expression," not "ideas."
The way an algorithm works, the way a program is organized, the interfaces it
uses: these are all ideas, not expression. So if you rewrote the algorithms in
your own idiom, you could take pretty much as much inspiration from the
original as you'd like.

------
jacobolus
Erm.. unless otherwise specified, any code is copyrighted. That's how
copyright works these days (at least in the US).

~~~
icky
Or in any country that's signed the Berne Convention.

