Once I realized that I started open sourcing everything, like pretty much every piece of code I’ve written in the past six years, I’ve open sourced purely as a defense against me losing access to that code in the future.
Having led open-sourcing efforts at a couple of companies now, for similarly self-interested reasons:
If the company doesn’t have a policy, that can be good! Try something!
Go for an Apache or similar license, don’t be clever, don’t deal with legal if you can.
Give a clear strategy for how open-sourcing stuff will be a benefit to the company (interoperation, recruiting, etc.).
Unless it’s in the clear business model of the company, make sure that the open-source work doesn’t create additional constraints on the developers–free as in puppies is a reasonable model (“Here’s the code, it’s licensed, if you want to fork it and do more with it please do so! We don’t take issues or PRs” is a very low bar that still is useful).
Do not put the company as the maintaining org of the project in your ecosystem of choice; let other folks handle packaging and whatever else–potentially including employees in their free time. If you don’t do this, you make it easier for company political issues later to leak into the dependency tree.
I am so much in agreement with this; once I have solved something it is so much easier the next time. If you can hold onto it you so far ahead on the next project. And that leads me to the next thought, that theoretically all of open source should work like that; somebody somewhere has solved your problem before. The problem is that you can’t just brain meld and arrive at exactly the place they were. The solution I would say is that we need a huge step up in documentation. Which is so hard, but maybe there could be standards that start from the big picture, assuming nothing, explaining who this is for and why they should care. Because just figuring out if some rando code is related to your problem is not obvious.
Many years ago, while I was in a team supporting a customer on-site with a rewrite of one of their systems we needed some code to let CMS editors input some code bits (in a JS-like syntax) and their lead dev was staunchly against using a proper parser but wanted to fix/sanitize whatever they wrote with regex or something, but ended up using the argument “if there would be some open source library we could use I’d accept that”.
So basically mostly out of spite and because I (and the rest of the team) didn’t like this band-aid sanitizing approach at all I sat down that evening and wrote the thing in my free time and released it with an open license. I’m not particularly proud of how it happened and I’m sure he removed the code later (just as he sometimes just rewrote things the team had agreed upon and implemented) but at least we tried to solve it properly and the fact that I got it working on one evening shows that it wasn’t really a big deal in the first place…
But I’ve not written this wall of text out of context, even after all these years I think it’s a decent solution to a not-so-rare problem and I would have totally used this if it had existed, or thought I could need this again in the future, although I was wrong - I haven’t needed it since. Code is at https://github.com/winks/janus
Absolutely, and with a permissive license, to make sure that I will be allowed to use it myself in future closed source projects that are paying my salary.
Not just for libraries I create myself, but also as a filter for which existing projects I’ll contribute to.
GPL is ok for … GCC … or for incidental tools such as cmake and ninja (which as it happens are both permissive anyway).
This is exactly why I do it as well! It’s also why most of the plumbing we did at my previous two companies wound up OSS :-) Some of these things have been bizarrely widely adopted, which is great, but also kind of scary.
As long as you use a permissive license. Otherwise you find that:
The new project is proprietary and can’t link the old code.
The new project is Free Software, but under an incompatible license.
The new project could use the library, but need sign off from legal and that’s more effort than writing it again.
The new project could use the library but because you’ve worked in a copyleft version you have a six-month cooling off period before the new employer will let you work on the project at all.
Having led open-sourcing efforts at a couple of companies now, for similarly self-interested reasons:
I am so much in agreement with this; once I have solved something it is so much easier the next time. If you can hold onto it you so far ahead on the next project. And that leads me to the next thought, that theoretically all of open source should work like that; somebody somewhere has solved your problem before. The problem is that you can’t just brain meld and arrive at exactly the place they were. The solution I would say is that we need a huge step up in documentation. Which is so hard, but maybe there could be standards that start from the big picture, assuming nothing, explaining who this is for and why they should care. Because just figuring out if some rando code is related to your problem is not obvious.
Many years ago, while I was in a team supporting a customer on-site with a rewrite of one of their systems we needed some code to let CMS editors input some code bits (in a JS-like syntax) and their lead dev was staunchly against using a proper parser but wanted to fix/sanitize whatever they wrote with regex or something, but ended up using the argument “if there would be some open source library we could use I’d accept that”.
So basically mostly out of spite and because I (and the rest of the team) didn’t like this band-aid sanitizing approach at all I sat down that evening and wrote the thing in my free time and released it with an open license. I’m not particularly proud of how it happened and I’m sure he removed the code later (just as he sometimes just rewrote things the team had agreed upon and implemented) but at least we tried to solve it properly and the fact that I got it working on one evening shows that it wasn’t really a big deal in the first place…
But I’ve not written this wall of text out of context, even after all these years I think it’s a decent solution to a not-so-rare problem and I would have totally used this if it had existed, or thought I could need this again in the future, although I was wrong - I haven’t needed it since. Code is at https://github.com/winks/janus
Can you point me at the license for janus? Just curious what kind of open source this is.
Oh damn, apparently that didn’t make it to this repo. Added BSD LICENSE file.
Absolutely, and with a permissive license, to make sure that I will be allowed to use it myself in future closed source projects that are paying my salary.
Not just for libraries I create myself, but also as a filter for which existing projects I’ll contribute to.
GPL is ok for … GCC … or for incidental tools such as cmake and ninja (which as it happens are both permissive anyway).
This is exactly why I do it as well! It’s also why most of the plumbing we did at my previous two companies wound up OSS :-) Some of these things have been bizarrely widely adopted, which is great, but also kind of scary.
As long as you use a permissive license. Otherwise you find that:
And so on.