I kinda hate this mindset. Programming is not about how much code you write, it's about understanding a problem and then coming up with a solution; writing code is but a small part of this process. If there is anything I have learned over the years it is that one should think first then code.
Here's the thing. Programming is incredibly complicated. Unless you're a robot or at least a lot more intelligent than me, there's no way you can think through all the bazillions of subproblems (many of them rather trivial) when thinking about how to solve a programming problem. You have to be able to solve those subproblems as they come up while coding. In order to be able to do that, you have to have a lot of routine. Writing a lot of code helps you get that routine.
You're looking too much into my phrasing. I don't expect someone to just sit down and write the same program over and over. The point is for them to come up with problems they want solved, and solve that problem with code. Thinking about the problem and the solution is a big part of the process, as you say.
I agree that sometimes just writing code is a good way to get started solving a problem however, I do not believe it is usually the best approach in general. Spending to much time planning can be a problem but many new programmers jump into writing something without even considering the problem much before hand. This approach very often leads to learning lessons the hard way, which I admit is not always a bad thing. In the long run though failing to learn to think and plan before you code can limit ones abilities.
Different problems call for different solutions and sometimes just jumping in and coding can be lots of fun but, on the other hand, some projects require a fair amount of problem understanding and planning. If you like to code but you don't enjoy hard problems (the kind that take real research) you eventually reach a ceiling in what you can do.
This response seems irrelevant. This is about a new programmer- not a project over ones head. The most important thing I did when learning = I sat down and wrote code, when I came across an issue, I learned how to fix it.
And because of that - it taught me to plan my code better as I went
Programming is like building stuff out of Lego. Just grab a box of lego and start creating things. I don't think fun would be had if you had to think and design and plan everything before you built it.