I recommend producing some useful items to fit in any toolbox under a very liberal free software license such as the three clause BSD or MIT license.
This allows you to write re-usable code that you can actually re-use, even when working on proprietary projects. Most importantly, it gives you something to show.
This is not only the code that I've
written, this is the stuff (Acme,
Inc.) can start using today to solve
some of the problems that we
That goes pretty far in an interview :) Most companies will gladly let you push any improvements to your public repository. Most sensible people realize that great development happens out in the open, and appreciate a dozen other people finding bugs for them. If not, just make a private fork. What is important is that:
- You get to not only show your code, but offer it as a solution
- The license you picked says you can do whatever you want with it
In this regard, you can have your cake and eat it too.
Note, I'm just talking about improvements to the tools that you showed them, not their entire project, when talking about development out in the open. However, you might get lucky enough to work for a completely free software outfit. If so, either permissive license is fully compatible with the most restrictive license that the FSF maintains.
Finally, if they want to take something you wrote in a whole new direction, perhaps a private fork would be best for all concerned. Or, perhaps they may realize that publishing the fork might get more customers.
Either way, you win .. and you need to do that when working specifically to make yourself more attractive to employers. I contribute to more than a few projects .. but I'm not looking for a job, or past experience to fortify me as a candidate for one .. licensing is quite incidental for me.