Ask HN: How to avoid legal issues when writing company-owned generic code?
Say I write a wrapper on company time for the `dd` *nix utility, and call it `MyCompany.BlockDecive.create`. The company owns that code, and there's no question about that. But now that pattern is stuck in my head, and for a personal project I write `MyPersonal.BlockDecive.create`. The `Xxx.BlockDecive.create` is so generic, and uses a convention I like, that I might end up recreating the something nearly identical. I don't wanna steal anything, and I don't want to even appear like I'm trying to open source company IP without permission.
Obviously getting a company's permission to open source something solves this problem, and I'm doing what I can to pursue that as an option.
Here's a real world use case for where this might come up... On Friday, I don't know how to implement a technical solution at work. Over the weekend, I figure it out, and post the code to GitHub in a sample app. On Monday, I recreate the sample app in a company owned project. Later on, someone discovers my sample app on GitHub, and now I'm being investigated for stealing company IP.
I've never gotten into trouble over this, and am not being investigated. I'm just researching how to keep myself out of hot water, so that if anyone sees my coding style in two places, there's no issue to be raised. I want to be conservative and honor the spirit of my employement contract.
"I am not a lawyer" (IANAL) responses welcome.