We study the production of knowledge when many researchers or inventors are involved, in a setting where tensions can arise between individual public and private contributions. We first show that without some kind of coordination, production of the public knowledge good (science or research software or database) is sub-optimal. Then we demonstrate that if "lead" researchers are able to establish a norm of contribution to the public good, a better outcome can be achieved, and we show that the General Public License (GPL) used in the provision of open source software is one of such mechanisms. Our results are then applied to the specific setting where the knowledge being produced is software or a database that will be used by academic researchers and possibly by private firms, using as an example a product familiar to economists, econometric software. We conclude by discussing some of the ways in which pricing can ameliorate the problem of providing these products to academic researchers.