Take the 2-minute tour ×
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.

In the past I did a freelancing project for someone where I wrote a couple of image filters. Nothing fancy, and a very very low cost project for them. I was wondering, if I wish to use these in a project of mine, would I legally/ethically be allowed to do that? If I couldn't use the exact code, could I at least use the general data I used to make them. (I modeled the filters in Photoshop and then coded a duplicate filter in a programming language.)

My specific work was done through freelancer.com and we had no special terms or conditions.

share|improve this question

closed as off topic by MainMa, gnat, Eric King, Dynamic, Walter Aug 21 '12 at 21:53

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
This has been discussed before. Unless you stipulated otherwise, the rights to the code you wrote belong to the client. It all depends on what was agreed upon in the employment contract (You DID sign a contract, didn't you?). I'm not posting this as an answer, because I'm sure this will be closed as a duplicate. –  Craige Aug 21 '12 at 18:30
    
This is dependent on a lot of factors. What does your lawyer say? –  user1249 Aug 21 '12 at 18:37
    
As I mentioned, this was a very low budget thing. He put the money in escrow on the site, and I did the work - there was no explicit contract, other than what freelancer.com may/may not have sitting in a dark corner somewhere. @Thorbjørn Ravn Andersen There's actually no issue - I was just thinking about it for a potential upcoming personal project, and trying to get a gauge on what I could or could not do. –  user1103976 Aug 21 '12 at 18:49
    
For small things consider having an open source library and use that in your future projects. Do not copy code directly. If you can reuse code it is of a generic nature already. –  user1249 Aug 21 '12 at 19:03
1  
I'm not upset that this was closed as I think the answers have worthwhile information. However, I tried asking on stackoverflow, and they pointed me here, and this apparently is not an appropriate place to ask this question either. Is there a stackexchange site where this would be an appropriate question to ask? I feel that it's general enough to apply to other programmers but not too general, and that it's a fair question in the realm of software development. –  user1103976 Aug 22 '12 at 1:25

2 Answers 2

In general, if there was no particular term regarding code ownership and copyright, then the copyright is yours.

In some countries, the ownership may be considered to be the company the work was done for (work for tender).

Of course this entirely depends on jurisdiction and you should consult a local lawyer to get an answer that will suite your particular situation and location.

share|improve this answer
1  
By default in the US ownership is with the original client as "work for hire." (AFAIK) –  Matt S Aug 21 '12 at 18:31
3  
@Matt S: The Wikipedia entry is en.wikipedia.org/wiki/Work_for_hire, and that makes it clear that it is primarily for standard employer-employee relationships, which the OP was not in. In the US, it would appear that an unwritten contract would leave the copyright with the person who created the code. However, DO NOT act on legal advice from people on the Internet. –  David Thornley Aug 21 '12 at 19:17

Ethically, a code "idea" such as a small pattern or even a custom UI control is typically OK to retain for future use elsewhere. Many of us keep "CommonLib" source libraries containing these kinds of things in a readily re-usable way. Even if not, you remember how you did it, and if it's a good way to do it then do it in other situations where it applies. It's ridiculous to try to assert that you shouldn't be a good coder on one project for one client/employer (including yourself) because you were a good coder on another project and shouldn't plagiarize the ideas you had while working for the other guy. It's called job experience.

Legally, it depends on what you signed when you were hired/contracted. Some companies force workers to sign lifetime NDAs with wording that could be construed to mean "you can't write a line of code for anyone else based on any knowledge of our own codebase". A good lawyer can get the lawsuit thrown out even if you did sign that (seriously, are you expected to hit yourself over the head with a baseball bat until you can't remember working there? Much as I might like to do so for some of my prior jobs it's a completely unreasonable expectation), but it'll still be a pain.

Big no-nos both legally and ethically include copying binaries or source that you specifically developed for one employer and pasting them into a solution for another. While patterns and algorithms are well-known, as are best-practice architectures, coding conventions, etc that can make bits and pieces of two competitors' codebases look similar, a source file that was copied verbatim is plagiarism, plain and simple, and an unmitigated violation of implied or explicit copyright as well as any NDA any competent corporate lawyer would draft. You would have to have stipulated, in anything you signed that would restrict this, at every employer you ever worked for, that you are entitled to retain a "portfolio" of general-purpose code that remains your property independent of your employment. You'd have to be damn good for an employer to still want you if you insisted on that, and the line would have to be very clearly drawn as to what you could and could not claim as your own.

Another fuzzy area where you might be OK, maybe not, is UI "look and feel". The bottom line is similar; while the basic GUI controls like buttons, textboxes, checkboxes, radio buttons, etc were all designed for minimum "surprise factor" and are in the public domain as UI concepts, and there are well-known combinations of same that similarly reduce the learning curve through familiarity, it's probably a bad idea to take a novel UI concept that one company developed (under your watch) for doing a particular task, and bringing it verbatim over to your next job where a new project has a similar need. The Telerik and DevExpress controls, and other third-party non-Microsoft proprietary UI libraries, are sold for money, and so are copywritten heavily; creating a carbon copy, even if you typed every character of the source file yourself, can get you in trouble legally; you have to prove that every single character was written without any more than a cursory (user-level) knowledge of how the third-party control works.

share|improve this answer
    
Thanks for the in depth information. It's amazing how confusing copyright, property rights, even patents can be in this digital age. I guess my best bet is to just write new code, even if I maybe could possibly legally use my other code. –  user1103976 Aug 22 '12 at 1:27

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