3 ms·
I have done it before. I put my personal copyright in the code. Then I ask permission in a letter to to include it. I have never had a problem. This was in
by russell 17y ago
I have done it before. I put my personal copyright in the code. Then I ask permission in a letter to to include it. I have never had a problem. This was in the days when every line of code was part of the crown jewels. It is a legitimate concern, but easily handled, very unlikely to appear in court.
You do need to give them pretty much open ended permission to use the code. A BSD license might make it easier, because they know how to deal with licenses.
If the code is closely related to their core competencies, it is much more complicated. For example, supplying trading algorithms to a bank.
If your code is really generic, maybe all you need is a comment telling where the code came from. Still mention it to your manager.
Aside: I consider it good professional practice to mention in comments the source of an algorithm or code snipit. Future maintainers will appreciate.