Watch out for 3rd Party APIs
Well, my lunar phases app went nowhere fast because the API went down. This was a good lesson for me.
There are several options for grabbing moon phase info, from quite a few APIs. OR one could (ambitiously) calculate it oneself in code. But I chose the one from the US Navy because it was simple, clean, had good documentation, and came from what I assumed to be a reliable source - the US Navy.
Of course this API went down for maintenance just after I implemented it. Just goes to show, building your product based on any 3rd party API comes with inherent risk. (What does JAM stack have to say about this?) Good news is the API is under maintenance and should be back, sometime…
There’s a second lesson in this: a dedicated developer is ‘in the know’ about the APIs and dependencies he/she is using. I have seen many a code base bloated with npm dependencies with dozens of errors/warnings that they just IGNORE on npm run, my own included. It seems I need to pay more attention to these things.