The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
I live in California, and I've researched this. I don't know about other states, but in CA here's the deal:
When you work for a company as an employee writing software, you are creating a "Work For Hire". This means that THEY own the code, not you.
However, if a company retains you on a consulting basis, say as 1099 contractor, and you write the code then YOU own the code... Read the section on "Independent Contractors". Note that is states "This last requirement disqualifies most software and other technology deliverables created by independent contractors". This means that work YOU write as a contractor is NOT copyrighted, therefore, since you created it then you are legally the owner.
I ALWAYS include in my contract (you ARE using a contract, arn't you?) a clause that states that after they sign the acceptance agreement then THEY own the code and thereafter hold you harmless from all claims arising from the use of the code.
This last part is important because you don't want them suing you 10 years later because they broke the code or changed some configuration somewhere.
I have a framework of code that I've created over the years. My ownership clause explicitly excludes these assemblies, so that they have rights to use them in THAT application but nowhere else.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
With no legal justification for any of this, just agreements (often verbal) this is what I do:
I have a large open source library that I often use in whole or in part on contracts. When I use the pieces of my open source code (or anyone else's) I put a clear comment at the top of the file that this code came from whatever repo. I even document code snippets I find on SO that way. So, that's the "past", as it were, as I'm using code I've developed independently, on my own.
Now, I also tend to work for some enlightened contractors - a couple of which I have a long term (20+ year) relationship, so there's a high degree of trust. I tend to separate things into two camps -- general purpose code that is not specific to the contract work, and the rest that is. I don't bill the customer for the general purpose code (though I do bill for the customization for their particular needs, and that code stays with them.) That arrangement is explicitly stated and, particularly when I end up writing an article on the GP code, it's actually appreciated because the client sees the benefits in the peer review here on CP.
Now, for a new client relationship, I don't just blindly do that. I approach the client with the idea of this separation between the GP code and the customer specific code, suggesting the benefits of putting the GP code into the public domain, particularly as it results in peer review and documentation, I'm not billing them for it, and they're already benefiting (sometimes considerably) from the open source community at large and my OS code in specific. I've never had a client disagree with that arrangement, and they appreciate that I come to them with their interests in mind first, requesting permission, essentially.
That said, I usually do contract work for small companies where I'm communicating directly with the owner or decision maker, I'm probably the only developer working for them, or if not, I'm pretty much flying solo on a specific project.
Joan M wrote:
What if the customer asks to sign down a document that gives him the ownership of the code?
See Kevin's answer. It also gets more complicated when I'm hired as an employee of a job shop that then contracts me out to a third party. But as a direct contractor, the answer would be "no." The real and separate issue usually tends to be how they can protect the code I write from appearing in the public, and I totally agree with them that that is something that neither they nor I want to see happen, which takes us pretty much into the discussion on general and domain specific code.
There are nuances though -- for example, if I'm using the company's equipment (particularly on site, but it doesn't matter), I'm very careful that anything I do there, frankly, I treat as their code, whether I'm a contractor or an employee. But working remotely, where I can turn the clock off and do my own thing, that's my business.
One suggestion is to put your code out there in the open source community - then you become just another open source resource that the company is most likely using a ton of already.
Customers know up front there are two kinds of code they get: Their code and my "library" code. The former is all theirs, and only theirs. Proprietary. The latter is for anyone. The customer can get the newest version years after I worked for them if they want it.
I only deal with people who are not the sort of people who would sue about code, in any case. They have better things to do with their resources.
For my part, I never, ever do contracts for outfits who compete with other outfits I've done contracts with. To me, it would be unethical to do so. Admittedly, "never, ever" doesn't apply to one organization which was and is so big they compete with everybody. In such a case, I must think of the organization as being only the tiny section/business unit I worked with.
What iv'e found in this day and age, is that vast majority of my clients think I just plug together open source lego bricks anyway.
Unless I'm being asked to participate on a very closed, internal application for a client (EG: an internal tool written for desktop use) then they assume that the code and libraries I use, come from open source.
NuGet/Npm and so on...
So they often don't question me about code ownership, as long as what they get works, at least with web facing projects their usually happy.
As I say though, if it's internal, binary and not for public consumption then there usually is a negotiated contract before either party signs.
If you are an independent contractor, your work done for another entity that contracts with you belongs to them - they have the intellectual property rights unless something in the written contract says otherwise.
However, a good practice that protects you and allows shareable usage between customers, is to create your own libraries on your own time, then make the use of them a condition of the contract. For example, the entity to whom you contract has the right to use your libraries freely within the application you wrote for them (as they may revise and extend the application over time using other developers), but only that application without paying a licensing fee (which will in reality rarely happen). Normally, they would get a copy of the library's source code at the time the contract is fulfilled, and sign a non-disclosure statement such that they cannot divulge the code to others.
That gives you copyright protection over your libraries, the contracting entity the right to alter your library code for their own use, and possibly create a revenue stream for you by marketing your libraries to other developers.
As a manufacturing engineer AND application developer, I would compare code to machine design.
What I explain to tooling and equipment suppliers is, if your quote has design (code) charges we (the customer) own the design making it proprietary to us the customer. If you the supplier want to own the design (code) specify in your quote that the design is proprietary and show me, that we the customer, are not paying for design time.
Very simple it depends on what you have contracted to do.
If there is nothing specific in the contract then you own the code as the author and for many clients that's all they need and expect.
However some clients might insist they own the copyright to the new code, if agreeable get them to pay you well!
If you are working or extending their code - then it could be implied that this is the case - as clearly they own the copyright of the original work and they are paying you in a way analogous to an employee, where they own the copyright by default.
Bottom line - Get the contract right for you and the client and that you both understand it!!!!
Interesting color scheme. Because, here in the US, the Republicans (financially conservative) are the red colored and the Democrats (liberals) are blue. And it is the liberals who are concerned about global warming. It is the conservatives who are getting a case of hemorrhoids listening to the liberals complaining about global warming.
Oi, you particles from other galaxies, coming over here with your increased atomic weights and abilities to form more complex molecules enabling the ability to form complex hydrocarbons giving rise to life and all the other wonders of our galaxy. Taking opportunities from our local, slightly lighter particles -
(Search for Stewart Lee and "Paul Nuttal from UKIP" to get the context of that one).
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
I wouldn't eat those things either. My gf and I are at the point where even the thought of going out to dinner, even "good" restaurants (to begin with, something that isn't a chain) results in a "run away" reaction. The crowds, the noise, the awful music, the crappy service, the fact that I can cook better than most restaurant chefs, and I know where my ingredients come from and I use quality ingredients (just about everything is locally grown / raised -- I know many of the farmers personally) makes "an evening out" quite unpalatable.
Then again, living out in the boonies 1) provides that opportunity and 2) there aren't any decent restaurants within 100 miles of us anyways.
And on the gripping hand, I also realize I live in the top tiers (at least when it comes to food) of first world luxury.