Is using someone's javascript code copyright infringement?

jjones

Lifer
Oct 9, 2001
15,424
2
0
I was just wondering if there is any legal precedent on this. I've seen plenty of javascript samples, looked at javascript I've downloaded from sites, etc. Much of this has some kind of notice reflecting copyright, or usage, whatever. Is that actually enforceable?

I mean, on the basis of putting a million monkeys in a room with typewriters, aside form all the caca on the walls, you'd eventually end up with this same piece of javascript. Given the way javascript works, or programming languages in general, various coders when finding a solution, would likely have very similar results, depending upon the complexity of the problem of course. So what's to stop anyone from taking a piece of javascript, rewriting the variables and calling it their own?
 

BigJ

Lifer
Nov 18, 2001
21,330
1
81
Is it a unique idea, implementation, or concept? If not, feel free to go ahead and use it (not word for word).

For example, if in Java you show an example how to read in a file that is the basic way to read txt files in general, and try to copyright the code, you'll be laughed at.
 

DaiShan

Diamond Member
Jul 5, 2001
9,617
1
0
You can protect snippets of code if you go through the proper avenues, most code that I've come across online in tutorials is free to re-use, if it's not, just hop on over to your favorite OSS repository and see if you can find what you are looking for there.
 

mugs

Lifer
Apr 29, 2003
48,920
46
91
Yes, of course it's copyrightable and enforceable. With little scripts it'd be hard to prove that you didn't just come up with something similar yourself (assuming there are differences), but with complex javascript it'll be obvious.