Code politics investigates the implications of digital code to contemporary politics. Recent developments on the web, known as web2.0, have attracted the attention of the field. The thesis contributes to the literature by developing a theoretical approach to web2.0 platforms as social structures and by contributing two cases of web2.0 structurations: Drupal, a content management platform, and The Pirate Bay, a file sharing website and political movement. Adapting the work of Ernesto Laclau and Chantal Mouffe on articulation theory, the thesis studies the code and politics of the two cases. The Drupal case studies the complex interactions between humans and code, and addresses how Drupal functions as an empty platform allowing its users to reconstitute its digital code. The Pirate Bay case demonstrates how a political movement uses code as part of their political platform. Not only does the group advocate file sharing, they allow thousands of people across the world to share information freely. At a time, when most web2.0 platforms act as forces of capitalism, the two cases demonstrate alternative, commons-based structurations of web2.0.