What steps do you go through before starting to code?
I was making a program to look for addresses on Google Maps and save the coordinates.
I went and spent quite a while of my time on it and after finishing, I discovered that what I was doing is called Geo coding and that there are full open source implementations ready to use.
How do I avoid going through something to later discover that there was a much easier way to do it?
You research the problem and plan it out silly. Just like you did when you realized it was a solved problem. Now instead of realizing halfway through you do your research before you start.
Just don't spend all your time researching. I don't agree with agile much, but working code really is more valuable than some clever plans.
>>62126504
Thinking exactly about problem, sub divide on part,thinking about someone had same problem,start to research about approache,books,paper or real world software, and yes put some time limit about how deep you go without code working solution.
>>62126504
https://en.wikipedia.org/wiki/Software_design