8

I think we've all been there:

You hear of someone say "hey, wouldn't it be nice if platform X had feature Y?" You look around (on SO!), the feature really doesn't exist, even though it probably would be useful in many contexts. So it's pretty generic.

Your mind wanders for a bit. "How tough would it be? Well, it'd probably be just a snippet. And an ad-hoc function. And maybe a wrapper." And boom, before you know it, you've spent a dozen hours of your free time implementing a FooFeature that's really neat and generic. The kind of code you might not even have the time to spit and shine at work, that would be a bit rushed and not so documented.

So now you wonder "wouldn't this be useful to others?" And you've got your blog, maybe a CodeProject account, and your colleague who asked if FooFeature exists might, haphazardly, come accross that blog entry, had it existed before they told you. On the otherhand, the NDA agreement. It's sort of vague and general. It doesn't forbid you from coding at home, but it's clear on sharing company code, that's a big NO.

But this isn't company code. Or is it? Or will it be?

So, what do you do with code (that's more than just a snippet) you wrote in your off time with universality in mind but an idea that came from work, and that will most likely be used at work? Can it be published?

Deco
  • 2,466
MPelletier
  • 2,058

4 Answers4

5

Questions similar to this have been asked before. It really depends on the employment agreement (contract) you have with your employer. My personal opinion is that if you did it on your own time outside of work hours, then you can do whatever you want with it, including publishing it as an open source project.

Your safest bet is to talk to your employer about what you have done and get their approval if you are unsure about how to proceed.

Bernard
  • 8,869
3

Consult your HR, legal, and/or ethics departments and review your contract.

For me, I can work on anything that I want to at home. I can even make libraries, publish them, and use them at work. However, I can't work on those projects at work. I also can't make products targeted toward our customers, especially those that compete with a product made by the company, even if I release them as open source products.

I've had plenty of ideas generated at work that I have or want to work on at home. For me, it's perfectly acceptable. However, depending on the terms of your contract, it might not be.

Thomas Owens
  • 85,641
  • 18
  • 207
  • 307
2

Just post up on your blog. If you employer complains take it down and let them keep the code.

Then start looking for a new job because you are working for jerks. It’s not like you are looking to monitorize this thing, Why waste money on lawyers? (My bet is you post it and nobody says a word.)

PS: Sometimes this place is just tad too politically correct.

Morons
  • 14,706
1

This varies widely based on location. In the US, there are generally two criteria: one of them (as @Bernard already mentioned) is whether you did the work during normal work hours. Another (that's often more important) is whether you did the work at the office or at home, and whether you used their computer or your own to do it. Generally speaking, if you did it on your own equipment outside of normal work hours, the employer would have to show specific clauses in an employment contract that said it would be theirs anyway to have any claim to it. If you did it on their computer at the office, the opposite would be true: you'd need to show some specific reason it was excluded from being theirs to have any claim to it. Using their computer at home would, from what I've seen, make it more of a gray area.

Throughout most of Europe, even writing it at home on your own computer gives you considerably less claim to the code. If what you've done is even vaguely similar to what you normally do for work, there's a pretty good chance that the courts would consider it their property.

I suspect Canadian law is somewhere between those, but offhand I don't know whether it's closer to US or European laws in this respect.

Regardless of the legality, I'd think a bit about how it's likely to affect your current job, and whether you're willing to put up with that. Even if it's technically legal, if it gets everybody who supervises you thoroughly angry, it's probably not worth it unless you really want to get a new job.

Jerry Coffin
  • 44,795