13

Well I don't want to make it open-source! That's the problem. But I do want to use it on my current job. Company did not agree to sign any alternative license with me and told me to rewrite everything from scratch so they will own it. :(

So how can I do it in a safe way so later on the company don't come back to me and say that I am using the code I wrote for them, which will be similar to the first version I wrote and own the copyright, on my personal projects or even on another job?

How would you rewrite a second version of a hash map without making it look like the first version? This sounds kind of hard to me. :(

chrisapotek
  • 642
  • 1
  • 5
  • 8
  • 12
    When I find some little snippet of code that I've accidentally written in two different places it's often nearly character by character identical. God I hope I never have to prove that in court. – psr Mar 14 '13 at 00:10
  • 1
    @psr - That seems to imply that you either do is perfectly the first time, or you aren't growing in your ability and realizing that there is a better way to do some tasks that you didn't see before. – James Black Mar 14 '13 at 01:04
  • 1
    Looks like you are facing a conflict of interest. The wise way would be to decline the assignment, but it is not an easy way if the risk is to be fired. – mouviciel Mar 14 '13 at 05:41
  • 1
    @JamesBlack "little snippet" - some 5-line functions really are like that and can't be improved upon except by improving the language itself. I've come across the same in my own code on rare occasion. – Izkata Mar 15 '13 at 02:04

4 Answers4

15

You need to speak with an attorney who specializes in copyright. That's copyright, not intellectual property. "Intellectual property" is a false combination of patent and copyright, which are two completely separate fields of law.

I'm assuming you're in the United States for the rest of this.

My personal recommendation is that, before you go any farther, you take your current source and do a formal copyright registration on it, including filing a complete copy of your work with the US Copyright Office, just like with a book or a song. (Note: Filing a full copy of the work along with the registration application is required by law for registration.)

Every copyright attorney in the United States will tell you that there is no substitute for a copyright registration certificate. There has been exactly one case* in all of history where the guy with the copyright registration certificate didn't win.

Copyright registration is cheap.

After you have the copyright registration certificate in your hands, then you start doing their rewrite. You can start doing design work, but do not write a single line of their code without first protecting yours.


* (Specifically, that was the George Harrison "My Sweet Lord" case: although the Beatles did have the copyright registration certificate, the judge ruled that there was no possible way he could have completely independently reinvented the melody and organization from "He's So Fine" (The Chiffons): there HAD to have been copying, even unconsciously.)
John R. Strohm
  • 18,043
  • 5
  • 46
  • 56
  • That's great info, John. Are you saying that even if I _unintentionally_ write a block of code that looks very much like the one I have a copyright registration, then in the event of a dispute I should be safe. That's awesome and give peace of mind! Amazing info, John! Thanks! – chrisapotek Mar 14 '13 at 01:12
  • 1
    @John I have corrected your answer because it was Georges Harrison, not John Harrison ;-) – Stephane Rolland Mar 14 '13 at 01:52
  • Distinction between copyright, patent and intellectual property varies among countries. Moreover, in many countries software is a special case, being both an intellectual and an industrial production. – mouviciel Mar 14 '13 at 05:36
  • 2
    Great answer, but randomly CAPITALIZING words in the MIDDLE of the sentences seems.. very meh to me. Isn't that what bolding is for? – TtT23 Mar 14 '13 at 08:39
  • 1
    "filing a complete copy of your work with the appropriate agency" HORRIBLE ADVICE. You've just released your source to everyone in the world, 99% of which doesn't give a fig for you 'copy rights'. You'd have more rights if you open sourced it properly. – Jim In Texas Mar 15 '13 at 00:16
  • @JimInTexas, deposit of a complete copy of the work for which copyright registration is sought is a legal requirement for registration. No deposit, no registration certificate. No certificate, no protection. – John R. Strohm Mar 15 '13 at 01:44
  • @chrisapotek, What I'm saying is that, with the copyright registration certificate in your hands, your employer cannot attempt to strongarm you to give up your rights to the original code. Also note that only the actual code you registered is protected: in this case, that should be enough. See http://http://www.copyright.gov/eco/ for more information. (If you are outside the United States, check with your local Copyright office.) – John R. Strohm Mar 15 '13 at 01:47
  • I would add the following important caveat to the "talk to a lawyer" advice: Only contact a lawyer if the value of the code is greater than the cost of talking to a lawyer. If you never plan on making money with your personal code I would not bother with a lawyer. – Craig Mar 15 '13 at 20:08
  • 2
    @John R. Strohm - you are mistaken. "Copyright protection exists from the time the work is created in a fixed, tangible form of expression." Google it, that's the law. – Jim In Texas Mar 16 '13 at 02:52
  • @JimInTexas, I'm aware of the law. I'm also aware of the practical requirements for defending copyright in court. – John R. Strohm Mar 19 '13 at 18:47
  • Doesn't it take some months to register software with the U.S. Copyright Office? And what if there's a slight mistake in the application, and @chrisapotek has to submit another one, and everything is therefore delayed half a year? — Then won't the employer be annoyed? (And still I suppose this might sometimes be the best solution) – KajMagnus Mar 21 '13 at 12:22
3

This is a great opportunity to use a pre-existing third-party open source solution, if one exists for your use case. Consider the advantages to both you and your employer:

You

  • No need to worry about messy IP.
  • You can learn an industry standard framework or library, which is something you can add to your resume.

Your Employer

  • No need to worry about messy IP.
  • No need to spend money paying an employee to write something from scratch.
  • The code is more likely to have been tested by multiple people in multiple environments, meaning it should be more stable and secure.
  • If the open source project is well known, it will be easier to bring in other programmers in the future.
VirtuosiMedia
  • 4,089
  • 4
  • 33
  • 43
  • 2
    Although a valid an interesting suggestion, it does not address the question. :) – chrisapotek Mar 14 '13 at 00:26
  • 7
    @chrisapotek - this answer does address your question. Namely - don't rewrite your code. Find another alternative. –  Mar 14 '13 at 13:42
1

First, you should consult an attorney to find out what options you have.

But, a hashmap is a standard collection, if you have made one that has a specific purpose, change the data types it is working with, perhaps, and it will be different, especially if you can have some attributes in one program that isn't in the other.

And, if you sit down with a blank sheet of paper and rewrite the code, I expect it will be different, as you have probably learned some ideas since you wrote your original one.

IP is always tricky as they can't tell you to not use what you have learned, but don't copy from your own projects, just write everything from scratch, and it will help to alleviate these issues, I expect.

But, again, talk with a lawyer.

James Black
  • 499
  • 2
  • 6
  • Thanks. The hash map was just an example. It is a low level framework. I wonder if it is ok to copy some blocks of code or blocks of logic. Probably not. But still. I wonder if there is some kind of SHARING license that SHARES the code between two people without making it OPEN SOURCE. If companies use open source, why would they not use that? I guess the problems will be the improvements on top of it while you are employed. :( But with open source the improvements also belong to the community. So my question now is: why would a company share with the world but not with its employee? – chrisapotek Mar 14 '13 at 00:27
  • Either you company will pay you to write it from scratch, so you just sit down and write the program, or, if they want to save money then they would need to make some deal so you can use what you already wrote. You could suggest it would save money if you use your code, but, you want to be allowed to take any improvements you make to the code to be used in your own projects (that would need to be in writing). – James Black Mar 14 '13 at 01:06
0

Use a different language! Re-write your C in Java or vice-versa. That way there is no possibility of long sequences of code looking the same.

James Anderson
  • 18,049
  • 1
  • 42
  • 72
  • a bubblesort in any language is still a bubblesort – Dan Pichelman Mar 15 '13 at 03:16
  • 1
    @Dan Pichelman -- Copyright applies solely to the text (that is the actual typed characters) of the program. Algorithms and methods are covered by patents which is a whole 'nother bag of scorpions. – James Anderson Mar 15 '13 at 03:57
  • @JamesAnderson As far as I remember, some other people on this site claim that a translated work would still be under copyright protection. I don't remember exactly what questions or answers though. – KajMagnus Mar 19 '13 at 20:25