This is just top down development.
Works great in many cases instead of bottom up development. It really is a design methodology:
http://en.wikipedia.org/wiki/Top-down_and_bottom-up_design
You just happened to be designing as you were going along coding