Depending on what language and IDE you are using, you may have some support for "consume-first development".
e.g. in Visual Studio, you could write this line of code:
NewObjectThing foo = new NewObjectThing();
Now, you'll get the red squigglies to indicate that the type or namespace
NewObjectThing cannot be found, and of course the code will not compile.
But if you right-click on it and select Generate -> Class, it will create a new file NewObjectThing.cs in the same folder & namespace as your current code, with an empty class declaration for
Similarly, if you then wrote:
foo.Name = "Fred";
..you could then right-click on
Name and select Generate -> Property to add a property to the
NewObjectThing class (and it would infer the type as
string based on what you were assigning to it).
There are add-on tools like Resharper and CodeRush that add considerable flexibility and power to this process.
Anyway, have a look to see if your IDE supports something similar.