You may notice that I say that much of what I produce is free. I mean not just “free” in the sense of “no cost”, but also that of freedom - I distribute code with minimal licences that try not to restrict how you use it.
You may ask why. I believe that producing code and publishing it openly helps others as much as it helps me. I am able to receive feedback (both thanks and criticism, which I enjoy in equal measure), and also contributions from people who wish to build upon my work. It also gives me an opportunity to give back to the community that gave me the knowledge and experience to get to where I am today.
I don't believe in restricting the use of my work to only non-commercial projects. As much as I would like to see more code produced in an open manner such as mine, I don't think preventing people using my work unless they also publish their code is going to help achieve this goal. For that reason I use the MIT/X11 free software licence whenever possible and welcome contributions from people who find my work helpful.