Live data from Hacker News

Build a hit counter for Gatsby with React, AWS Lambda, and FaunaDB

joshwcomeau.com

51–52 of 52 posts

Re: Build a hit counter for Gatsby with React, AWS Lambda, and FaunaDB

#51

Earlier quoted context omitted.

I used to be “dependency-first” for library code, but I’ve noticed lately that my first question has been “why wouldn’t it be a good idea to build in house?”

Two reasons not to build in house: 1. Edge cases. You cannot possibly cover every possible edge case. This is why back in the day we had "Site works best on IE". Libraries are often used by a lot of people thus edge cases you couldn't possibly think about are covered. 2. Someone else maintains it. If your job is to build an application, why are you spending all your time maintaining a library that just facilitates yo…

One reason to not not build-in house:

1. Edge cases. Chances are you do not need to cover every edge case, at least when building an MVP. It can take more time to learn a complex API than to build in house. See also premature optimization.

2. Someone else maintains it. In the event you decide to use someone's dependency and they decide to unpublish it with the click of a button.... (ok at least this one has been fixed, but API versioning can still be a bear).

Re: Build a hit counter for Gatsby with React, AWS Lambda, and FaunaDB

#52
post #50

Hey folks! Author here. Just a quick clarification, this is NOT a sponsored post by Fauna, as some have claimed. As the article states, the choice for database is somewhat arbitrary, you can swap it out for Mongo or whatever else you’d like and not much code would need to change.

This is going to sound crazy but about a few years ago I sent you an email about learning Javascript. I think you were at Unsplash about to go to Khan Academy? Or was it the other way around haha. I just want to say thank you for your kindness - the tips and advice you gave me definitely contributed to the career path I have today. I know that responding back to some random kid may not seem like a big deal, but I wou…

Glad to hear it was helpful :D
Post reply on HN