(Probably dumb) question about copyright

I am developing a webapp for my company right now. During the development I’ve often seeked for help here on the forums when I got stuck. Sometimes I also had to post some code to help other users find out where my mistakes where.

Now, my question is: am I “allowed” to post code of something that will be used by a company, and will eventually be its copyright?

Probably this is a stupid question, but I’m curious to know, in case also for future projects.

How much code are you intending to publish? If it’s a helper method that will be used in code then I don’t think it’s a problem.

Also, what country do you live in? The law differs in the US when compared to countries like the UK and others in Europe.

You can have a look at the code I’ve posted if you look for the threads I’ve started. It’s not much code, just some lines where the problems were,

And I live in Italy, do you know anything about the rules here on this matter?

Is this company you are an employee of (you said ‘my company’)? If so, the company owns everything you do as you write it, you never own it yourself.

Your employment contract probably forbids you from disclosing anything like that, but in reality, it’s unlikely to be a problem, not for small snippets.

If you are concerned, have a chat to your employer.

Yes, I meant the company I work for. Actually, though, I am not a real employee, I am a “freelancer” doing this project for them.

I don’t think this is a problem, I was just curious. Also, the snippets I posted are not exactly the ones that are now in the actual code because if I posted them it means that they contained some errors :slight_smile:

Another thing about this topic: do you think that it could be a problem having let a couple of users login to an online version with test credentials?

On a side note to this subject, Blogger and software mage Joel Spolsky has written a rather comprehensive answer to a question on ownership of projects in free time that may be useful to the original poster. Some of the things he addresses are of some value and may be quite surprising.

http://answers.onstartups.com/questions/19422/if-im-working-at-a-company-do-they-have-intellectual-property-rights-to-the-stu/20136#20136

If the copyright were mine I would be allowed to post some code right?

You can do as you please with your own work, however, under a work for hire arrangement where copyright is due to be assigned to a third party at the end of the contract, I don’t know, I’m sure there may be an argument to be made that you need the intended owner’s permission, or perhaps include a clause in your contract that gives you the right to do it.

As I say though, I really don’t see it being a problem for just code snippets.

Ok, thank you :slight_smile: