DEV Community

Jevon
Jevon

Posted on

Teaching Yourself to Code (VI)

Update.

Just a quick update, mainly to keep track of where I am with this and to get a feel for what other areas might be useful.

Added a portion for users to gain information on stores around them within a 3.4km (~2.1mi) radius.
near me 1
near me 2
near me 3

Turns out, there's a package called geocoder which seems to locate the user's IP and returns their geographical coordinates. Which was super handy for the above functions by passing each coordinate value
coordinate function

Two main drawbacks here: it doesn't seem to work very well in a mall. That is, the majority of the stores it located were outside of the mall where I was testing it. It's possible it has something to do with how the stores within the mall itself are set up, maybe inside of a specific directory so not immediately listed as a store but the mall itself, or it could just be a bug that I will have to fix later.

Plus, as I've recently found out, if one of the authentication servers goes down, the entire analytics system goes down; which, in turn, actually is not a euphemism for refreshing my API keys. Instead, it means I'll have to either find a solution that's more reliable than Google in order to keep the application up and running, thereby keeping the users happy, or find some means of hosting things independently.

The primary drawback to hosting things independently and not using an open source like Google means that my code would probably then become proprietary and I'd be unable to share any major updates.

Now, the real question that I still have yet to answer remains: How is this useful for finding stores around the area where the user has spent the most money and are thus likely to spend again?

Along those lines, do horizontal bars look better than vertical ones?
horizontal
compared to
vertical

Latest comments (0)