Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have written a small library of classes in my preferred language (PHP, but it doesn't really matter), and typically use them in most of my projects.

Until now, the projects have been personal, or small stuff at my part time job that isn't really a commercial product. Neither of these things worry me as far as the freedom I have to reuse those same libraries later. [On that note, should I be worried about the part time job uses? Could those cause issues with my libraries later?]

Soon, however, I expect to enter into more serious free-lance/contract work that I have no doubt will use the libraries I've written.

Do I need to make sure the contract or work terms explicitly allows me to use my previous code in the project and - more importantly - after the project, or is a Github history showing that it was clearly developed long before any contract enough?

What are the legal troubles with code like this (libraries, code reuse, open-source, etc.)?

share|improve this question

3 Answers

up vote 2 down vote accepted

It is good to think carefully about these issues ahead of time, even though you seem to have everything in hand.

  1. You do need to make the employer aware that you are going to be licensing this code to them (sourcecode license, in perpetuity, for derived works etc).

  2. You should document that licence explicitly in the source code.

  3. That gives them an opportunity to make an informed choice.

  4. Be very careful about and talk to your boss about derived works that you make on their behalf (they would own all derived works, they would be unhappy to see derived works on github). You might need to talk to a lawyer in terms of evening work that you do on the project.

  5. It might be easier for you to fully open source the code first, then you can say in the agreement that contributions/enhancements to your project x are expected, and contributions are explicitly under the same open source license.

Talking to your employer about this might be a good thing, or could label you a pedant (like most programmers) so tread lightly.

My wife went through this when she started teaching. She brought her teaching materials into the school. So she got her contributions documented at the start so she can use them in future.

share|improve this answer
Thanks for the answers, guys, I picked one arbitrarily, because they both have valid info. Thanks again! – rockerest Jul 12 '11 at 4:22

Typically, I would suggest that you discuss this with your employer. They typically provide you with a form that let you declare any IP that you possess prior to entering into the contract. If better you declare your work before hand, or they can consider you produce such work within the duration of the contracted work.

You mentioned about the time stamp on GitHub, but why getting yourself in the position of having to prove your innocence when you could have just declare it before hand?

share|improve this answer
Why? To cover your ass. Let's say one of those part-time jobs, who has the library and thinks they own it, develops it further and it becomes wildly successful. Then they see his new job using their what appears to be their code. Now all eyes turn to rockerest demanding an explanation. – Philip Jul 11 '11 at 14:48
Philip, you are actually proving my point. I was saying that it is nice to have timestamp from GitHub to cover your ass, but if you can, come clean and declare your IP before entering the contract, so you won't have to waste time trying to defend yourself. Not sure about other companies, but when I joined Microsoft (not with MSFT now), I had to declare a list of my IP and previous works, so to avoid confusion. That's why I suggested OP to discuss with his/her employer beforehand. – Antony Jul 11 '11 at 20:39
Thanks for the answers, guys, I picked one arbitrarily, because they both have valid info. Thanks again! – rockerest Jul 12 '11 at 4:22

In addition to the other points raised, don't assume you only have to have one license.

You could happily release one version to the public under GPL and have another which you license to your commercial customers with support. My answer to another related question might be interesting to you.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.