I don't know how to describe it well, so let me just start and you get an impression of what I mean.
When I start writing a program or a script I asks myself, what it should do and what is necessary for it. Then I gather my material of frameworks or new things I would like to test out. My next step is to open up my text editor and lay out the basic function and classes I might need. From these classes and function I pick the one which is most important. For example I need to scrap some website, so I write the scrapping function first, because without it everything else would be useless. I debug these function till they work and go to the next higher function. At the end I write the interaction with the user.
Do you have other approaches like writing the whole script in one go and then start to debug it and if so, why do you do it this way? Does a design pattern like Model-View-Controller interfere or forces you to write your code in a specific style?
I'm excited for your answers!