Root of All Evil
First make it work, then make it right…
Premature optimisation. It can be the root of all evil.
Planning and coding are very much iterative processes.
You take small steps, focusing on making things work first. Only then can you really start thinking about optimisation.
If you already have working code, the planning then gets easier because there are fewer unknowns or hypotheticals.
You then take a few steps back, plan things out for a while, re-asses the big picture, then try to adjust things based on your observations.
The pragmitic reality, is that 99% of the time, code that just works (and is readable) is good enough.
The adjustability of code is one of the reasons the world moved away from specialised hardware and embraced software (running on generic hardware).
You can always come back later, and adjust things. Just don’t let yourself do too much up-front.
Figure out the core requirement, and focus on getting it working first.