Open sourcing is only really beneficial to yourself if the code is usable in your new job. Hopefully you're trying something new and growing - you probably shouldn't be switching jobs to work on the same kind of problems (or even with the same tech stack).
Of course, if the open sourced project becomes wildly popular it's great for your CV, but that doesn't typically happen.
Also, just flinging the code out in the open isn't enough. The company needs to be a good steward of your open sourced contributions. At my last job I left a few reusable open source Django components which I thought were very nice (and others are using it), but nobody felt responsible to take care of the project, so it languished. Now it is several Django versions behind and has bug reports which aren't being fixed. This was rather disappointing to me. I had really expected better because my colleagues in general were typically pro open source. I'm not using Django anymore, and I'm not inclined to put any personal time into it to keep the project alive.
> This was rather disappointing to me. I had really expected better because my colleagues in general were typically pro open source. I'm not using Django anymore, and I'm not inclined to put any personal time into it to keep the project alive.
Why would your colleagues want to maintain your pet project instead of making their own? Most open source projects live or die with their main contributors, if you expected the company to spend money maintaining your project then that’s the wrong expectation in my opinion.
> Why would your colleagues want to maintain your pet project instead of making their own?
The projects in question were Django model field types, which I used in the larger projects I was working on. I made them available on PyPi so they're re-usable by others, and for easier installation. Maintaining these should be in their own interest, as the projects in which they are used are mission-critical systems for their customers.
Presumably they haven't upgraded their Django in ages, so they didn't need to do any maintenance on these packages. But still, a) they may hit these bugs themselves sooner or later and b) the projects exist under the company's GitHub profile, so it makes them look bad.
Of course, if the open sourced project becomes wildly popular it's great for your CV, but that doesn't typically happen.
Also, just flinging the code out in the open isn't enough. The company needs to be a good steward of your open sourced contributions. At my last job I left a few reusable open source Django components which I thought were very nice (and others are using it), but nobody felt responsible to take care of the project, so it languished. Now it is several Django versions behind and has bug reports which aren't being fixed. This was rather disappointing to me. I had really expected better because my colleagues in general were typically pro open source. I'm not using Django anymore, and I'm not inclined to put any personal time into it to keep the project alive.