“Wishful Thinking” is a very powerful programming practice:

Before implementing a component you write some of the code that actually uses it. This way you discover what functions with what parameters you really need, which leads to a very good interface. You will also have some good test code for your component.

The idea is based on the fact that an interface’s purpose is to simplify the code that uses the component, not to simplify the code that implements it.

from Wishful Thinking

Like Test-Driven Development drives the design of code into code that is easy to test, wishful thinking drives the design towards code that is enjoyable and understandable to interact with.

In Different ways I start writing new code, I wrote about this as one of the ways I work in when I start with new code.