Internet use has become ubiquitous in the past two decades, but governments, legislators, and their regulatory agencies have struggled to keep up with the rapidly changing Internet technologies and uses. In this groundbreaking collaboration, regulatory lawyer Christopher Marsden and computer scientist Ian Brown analyze the regulatory shaping of "code" -- the technological environment of the Internet -- to achieve more economically efficient and socially just regulation. They examine five "hard cases" that illustrate the regulatory crisis: privacy and data protection; copyright and creativity incentives; censorship; social networks and user-generated content; and net neutrality. The authors describe the increasing "multistakeholderization" of Internet governance, in which user groups argue for representation in the closed business-government dialogue, seeking to bring in both rights-based and technologically expert perspectives. Brown and Marsden draw out lessons for better future regulation from the regulatory and interoperability failures illustrated by the five cases. They conclude that governments, users, and better functioning markets need a smarter "prosumer law" approach. Prosumer law would be designed to enhance the competitive production of public goods, including innovation, public safety, and fundamental democratic rights.