2

I occasionally worry that when I borrow snippets of code from websites, etc. there's at least the theoretical possibility that this will be copyright infringement. However, small pieces of code to accomplish common tasks may be too unoriginal for copyright and in practice this kind of sharing happens all the time. What are some rules of thumb, ideally supported by legal precedent, as to how substantial and original a piece of code must be to be copyrightable?

P.S. I know there are no hard and fast rules on this and that a definitive answer to a specific case requires a lawyer. However, since I'm only looking for rules of thumb here, answers to this effect will be downvoted.

dsimcha
  • 17,224
  • 9
  • 64
  • 81

3 Answers3

1

I am not a lawyer and there's no formal training in legal theory behind this, but since you asked for rules of thumb, here's one:

If someone posted some code on a publicly-accessible website, they most likely did it with the intention of sharing something they found useful with other people. If they catch you using it, they're a lot more likely to think, "oh, cool, someone's using my code" then "grr, someone's ripping off my work; I'd better call my lawyer!"

Mason Wheeler
  • 82,151
  • 24
  • 234
  • 309
  • Right. I just wish more programmers would understand how Draconian modern copyright law is and therefore make this explicit when it's their intent. For example I wonder if there's any legal basis (not saying it would happen in practice) for suing someone who copies code snippets off Wikipedia into a closed source project, violating Wikipedia's copyleft. – dsimcha Apr 02 '11 at 00:02
0

Generally, for small pieces of code (as most snippets are) its hard to prove that copying has occured. Very hard (unless something really specific is the case).

As far as practical life goes, it usually boils down to - if you're not making enough money to bother the original author, the original author will not bother you with the lawsuit.

Rook
  • 19,861
  • 9
  • 53
  • 96
0

The rule of thumb is 5 lines of code.

Another rule of thumb is that if you have some good reason why a piece of code cannot be written any other way due to external limitation, it is not expressive, since there is no room for expression, and therefore not protected by copyright. T

Of course, as you already know, for important stuff, you really should consult a lawyer, but these are the thumb rules.

gby
  • 151
  • 1
  • 4