Writing some code, finding a better way and Rewriting

Does anyone else find themselves partway through a project - and then work out a much better way of doing things, to rewrite it in the better way.

In (what currently seems like) and infinite loop of this at the moment on my weather app!

Wondering if it was just me and my bad planning or if this was a regular thing for new coders?

1 Like

It happens too often :unamused: But I think it is good, to check if your code can be improved. Though an infinite loop, might be a bit too much :slight_smile:

1 Like

That’s the process, I think. It can be paralyzing to try to concoct the “best” code before starting; so, we write anything, try any idea that might work. As we do, better ways present themselves as the problem becomes more clear. Often, I’ll try 2-3 different solutions to the same problem–just to improve my skills and problem-solving. (I love repl.it for this!) Here are some thoughts on Beck’s famous quotation: http://henriquebastos.net/the-make-it-work-make-it-right-make-it-fast-misconception/