At work, it takes 15 minutes to fully build the application. If the system I'm building is sufficiently small, I go ahead and code it right away and simplify as it's built.
If the system is large (for example, I'm currently building something which is around 1000+ lines) I write a functional spec first, figuring out the high level design and a few nitty-gritty lower level things. This helps simplify things because you can see exactly how two pieces that look similar can be split off into one piece.