“…it is easier to make changes to a design document than it is to the code.”
This quote is from an interview with lavabit founder Ladar Levison (1). There is a very important dynamic in software engineering. Ambiguous, ever-changing scope and functionality make coding a lot harder and time-consuming.
Personally, in my most effective coding sessions I can remember, I had a clear design and objective and I was only writing code to comply my own rules & API, at least between specific versions.
However there are also times which you can’t design in advance or effectiveness isn’t the first priority. :)