I think that there is merit in thinking very carefully about what you do before you do it, just to stress this point. However, it is true that you cannot foresee what you will eventually ask of your code, so the most important thing is to keep to good design principles. It becomes structurally much easier to later modify the flow of execution if everything is nicely encapsulated, and even change implementation details.
But best choose one or the other. Either spend an inordinate amount of time planning and thinking before writing anything, or do the basic ground work, and get started - and quickly identify what might need to be changed. That way you make the best use of your time :)