What is the end goal? Musings on programming.
I a doing FreeCodeCamp’s Build a Weather app for the 2nd time. (maybe 3rd? who knows)
This time I thought I would get fancy, try to get the location from HTML5 first, then if an error, get the location from a IP geolocation service.
Well, I am finding that some functions don’t wait for the return of data from another, and rather than having an orchastrator function I would need to chain the functions together.
example:
Original: master() call geoHTML5; if error master() call geoIP;
now: master() call geoHTML5 call geoIP() call….
Now I could just forgo HTML5 geolocation since IP geolocation works and actually has better data than HTML5 gelocation.
What is my end goal? To finish the project? Then ip geolocation would be the right choice, dont waster time on other things.
But what is my REAL end goal? TO get better at programming and learn the ins and outs of javascropt. That means I need to deal with my original plan and found out how to implement it..
What is the end goal? I’ve already done a weather app. The goal is to get better at programming.