As a freelance developer working for a client, I don't have the luxury of daily stand ups to get the outline for a new feature I have to work on. I also don't have the benefit of having another programmer sitting beside me or even in a remote location to talk about the feature further in a pair programming session. When you're on your own, you need to find other ways to kickstart the development process of envisioning a feature of a system.

I generally have a rough idea of the feature, but sometimes even getting a rough idea can be difficult. It pays to talk to the customer or even the product owner to get all the details you need, but sometimes even after that you might still be unsure. Where I usually falter is that I understand the feature but seeing it in code or as a set of objects can be difficult.

One technique I've been using is writing the sample code of how I would eventually interact with the feature once it is shipped. This isn't production code or code that's even going to be run. It's just me hammering out sample code on text file. The benefit of this technique is that I can identify simple objects such as classes and properties without too much code. It also lets me see if I'm starting to build dependencies on other objects. It might not be viewed as TDD friendly, but when you're working on your own, anything that helps should be considered.

The code itself consists of creating a couple of instance objects and setting the attributes needed for each one until I've satisfied the need to have a set of objects that could be read from a database. There's no fancy Rails code here, it's just plain old Ruby. I don't even bother to refactor it at all as I'm just looking to get an initial design from the code. Then I can start TDD'ing the feature with the my new found understanding.

I've no idea if this technique has a name or not, but it works well for me when I have problems envisioning the design for a feature.