Test Driven Development
First write the tests, then write the code. That has to be one of the most counterintuitive XP practices, to write a unit test for something that hasn't been created yet! But it is one of the mechanisms that helps enforce the minimalist approach of XP: Only write as much code as you have to in order to satisfy the User Story. Writing tests in advance help uncover gaps in the User Story or the in understanding of the developer. It also helps reduce "runaway code" by keeping development focus on achieving one objective: Getting the unit test to work.
