The contest between closed and open source concerns the trade secret protection of software source code and of the ideas embodied therein. Thus open source is not about giving away the software machine to users: it is about sharing its design and components amongst producers ( free as speech, not as a beer ). Trade secret has always been the main legal tool to protect ideas in software, given the latter's peculiar characteristics. However, the fact that open source software does exist and exhibits an impressive rate of growth in some fields, tells us that there must be a problem with trade secret, and that sharing ideas in software entails higher gains to developers. This paper tries to explain the shortcomings of trade secret protection of source code (insufficient scope of protection, risks for data security and users' privacy, disincentives to developers, inefficient differentiation of products) and to find out what are the actual returns of open source developers from sharing source code (skills improvement and intellectual stimulation, reputation and career improvements, userdriven innovation). However, the fact that not all software is open source suggests that sharing source code is not always rational, from the developers' point of view. Given that some costs related to trade secret protection mostly affect software users, and since open source seems to dominate mainly in fields where programmers are also lead users of the software they develop, one may argue that software producers choose open source only when they have to internalize all costs of inefficient legal protection. Therefore, open source may be in principle more socially efficient, but when the costs of trade secret are not fully internalized by developers, the latter tend to stick to the closed-source business model.