Good question. For starters, put
'more efficient' on the back burner and learn algorithms. Without knowing the brute force approaches, we can hardly expect to recognize one.
Take for instance sorting. How many ways are there to sort a list? If we could not see the output and were inspecting raw code would we recognize a sorting algorithm? Not if we had never seen one, we wouldn’t. We might not immediately identify the type of sorting, but that sorting is taking place would become evident on penciling (visually parsing) through the code.
When the time comes to put our finished ideas into a committed version, that would be when to look at bench marking and efficiency. Until then, concentrate on code patterns and being able to spot the segments that can be simplified without changing the outcome.
Bottom line, algorithms. Garner a host of knowledge around the ones that already exist so you don’t spend your time re-inventing the wheel, but also challenge yourself before delving into each new chapter. Build upon the idea regardless of wasted resources, make it work, then find ways to simplify it and reduce resource usage. From there efficiency is an easy thing to work out. Leave it to the last in terms of consideration.
Development of any program is going to follow these steps. If we look at it from a different perspective, it’s the opposite of thermodynamics. We are bringing order to chaos.
The main thing to keep in mind is that we cannot constrain ourselves with order when ideas are being bounced around. We have to play with them, predict outcomes and analyze the unexpected ones. We must take full liberty with our code and feel complete freedom to overuse resources.
realization => proof of concept -> make it work
simplification => reduce to robust extremes -> build horsepower
optimization => garbage collection, clock ticks, duplication, etc.
Whatever people are saying, don’t make optimization a priority. You’ll miss too much of the really important (and fun) stuff. Give yourself time to learn and grow and go for the biggest playground.