"Measure 3 times, cut once."
When I'm assigned to build an application, I don't go and open my development tools.
I grab a pencil and paper and then I think about the application & the problem. I analyse it to it's core; I write down the list of problems I have to solve; I list requirements of the application. In this stage I determine exactly WHAT has to be done.
After that, I think.
I think for a long time: I think about HOW to solve all of these problems. I think of connections between problems and their similarities. I think about the final structure of my application.
Then, after a lot of contemplation, I start writing sketches of the code (still on paper). I sketch the end results, I visualize in my head what I'm going to write and how it's going to be executed.
Only then, after a lot of thinking and analysing, I start writing the actual code.
Basically, my ratio between thinking and coding is 5:1. If I have a task at hand, I'll think about the task 5 times longer then coding it. That's my usual rule of thumb.