Some of you must be working for companies as programmers so you might be able to answer my question. If you work on a project for a client and create a very important or interesting source code for them. Does the code belongs to them or are you allowed to use it eventually on your own websites ? I am asking this because after hearing about the Connect U and Facebook trial, I think it must be tuff to work on someone else's projects you know you wont be able to profit even tho you are doing some of the hard work...
What do you mean 'you wont be able to profit'? You already did profit when you got your salary. Do you hear McDonald's employees complaining that they don't get any of the profits, even though they're the ones doing all the hard work? Besides all of that... for all normal, salary type jobs that I've ever worked, when you start the job you know that your work is a work for hire and that all copyright belongs automatically to the company that you are working for...
Whether you are hired as a consultant/contractor, or work full-time for a firm as an employee, the code belongs to them. Additionally, you might be bound by a non-compete clause which prohibits you from working on a similar kind of project for a certain number of years after you leave the firm (or the contract ends). These are a little harder to enforce in court (some have been enforced, others discarded, it's luck of the draw, and IIRC some states might even disallow such clauses). This is why many places ask you to list projects you've worked on or are currently working on when they hire you; they want to have in writing a list of things you're involved with or even might become involved with. The only exception here is if you have a clause in your contract/employment agreement which gives you a cut of the profits or some form of license to use the code you wrote for them. The former is not unheard of (I had a profit share clause in a contract once). The latter is very rare. Mind you, this has always been a thorny issue in the software industry, at least for the twenty years that I've been in it.
I meant share the eventual profit. That's what I wanted to make sure, Thanks That's also what I wanted to know, if there was sometimes a possibility of getting a share But just wanted to clear out that I think working for a regular salary offers a sense of security and getting a share of the profit is just a bonus which I would not mind having =)