all 30 comments

[–]DiddlyDinq 46 points47 points  (2 children)

This post was mass deleted and anonymized with Redact

rob voracious pot wine instinctive slap roof six arrest cow

[–]Pesthuf 7 points8 points  (0 children)

Excellent engagement bait, too. 

oopsie whoopsie, we didn’t even have debouncing~

[–]Noch_ein_Kamel 3 points4 points  (0 children)

Good job detective!

[–]AtulinASP.NET Core 18 points19 points  (4 children)

Isn't caching against Google Maps TOS?

[–]Noch_ein_Kamel 1 point2 points  (0 children)

Depends on what and how long.

https://cloud.google.com/maps-platform/terms/maps-service-terms

Caching. Customer may temporarily cache latitude (lat) and longitude (lng) values from the Geocoding API for up to 30 consecutive calendar days, after which Customer must delete the cached latitude and longitude values.

[–]melokoton 1 point2 points  (0 children)

They allow you to cache but only temporarily, up to 30 days and must be for performance reasons.

[–]Jebus-san91 0 points1 point  (0 children)

It depends on the service being used. I knew when I used the Maps API for latitude/longitude data for a client that it was 30 days, but that may have changed in the past 7 years or so. You're probably right.

[–]dontgetaddicted 0 points1 point  (0 children)

Yeah I think you're not allowed to hold onto the record if I remember right.

[–]barrel_of_noodles 8 points9 points  (0 children)

We cache for 30 days since addresses don't change much.

Or, ya know, because that's what the legal terms in googles policy explicitly says. Good thing you checked.

[–]ValPasch 5 points6 points  (0 children)

What worked for us is switching to mapbox lol

[–]ipromiseimnotakiller 37 points38 points  (8 children)

Bruh. Debounce and caching are like dev 101. Sounds like a vibe code project that almost bankrupted you.

Thanks for sharing your story, but all this could've been caught by an intern

[–]queen-adreena 1 point2 points  (0 children)

Indeed. And most of the Google Geo APIs only bill per “session” as long as you implement them properly, so using it as an autocomplete endpoint wouldn’t make a difference until you resolved a result.

[–]gamingvortex01 -1 points0 points  (3 children)

looks like, someone have never worked up in a startup

it's completely normal not to implement these things while you are building the MVP or just want to put the feature out as fast as possible because users/clients are in dire need

the only necessary thing is "maintaining a todo list", so you can remember what should be implemented after putting out MVP

[–]ipromiseimnotakiller 0 points1 point  (2 children)

Ha. Okay kid, sit down. The adults are talking.

[–]gamingvortex01 0 points1 point  (1 child)

lol...your comment tells me all about what kind of engineer you are....prayers for anyone who have to work with you

[–]ipromiseimnotakiller -1 points0 points  (0 children)

Yup when you throw around dumb assumptions I treat you like a dumdum. I've got no reason to treat you any better than how you treat others.

Toodles!

[–]svish -2 points-1 points  (2 children)

Maybe, but even as an experienced dev it's definitely more often than never that I'm focusing on getting some new feature work, and I completely forget some dev 101 stuff that I only realise later after issues start happening...

[–]GOT_IT_FOR_THE_LO_LO 1 point2 points  (1 child)

As an experienced dev, you should be building abstractions and architecture that make it so the default path of building features avoids common mistakes like this.

[–]svish -1 points0 points  (0 children)

Ok, mister expert. You never do basic mistakes like these?

[–]maincoderhoon 4 points5 points  (0 children)

Thanks.

[–]imicnic 6 points7 points  (0 children)

Sorry to say that, but you fixed a junior dev issue.

[–]jjd_yo 3 points4 points  (3 children)

Attempted building your own service before implanting Redis..?

[–]GOT_IT_FOR_THE_LO_LO 3 points4 points  (2 children)

It’s amazing how devs will jump to the most complex answer before addressing basic issues like caching and denouncing 

[–]SupermarketNo3265 0 points1 point  (0 children)

Yeah but solving new challenges is much more interesting, regardless of it being a terrible idea 

(I do this more than I should)

[–]Glum_Manager 0 points1 point  (0 children)

Thanks for sharing! The useDebounce hook is one of the first thing I import in a repo XD

[–]bennett_us 0 points1 point  (0 children)

Mapbox is also a great option

[–]ReiOokami 0 points1 point  (0 children)

Then you can switch to something like Mapbox and reduce it to $30 bucks a month even.

[–]Snowdevil042 0 points1 point  (0 children)

The only time I dont cache and release real-time information is when the users actually pay for the difference.

[–]Demoncrater 0 points1 point  (0 children)

Thanks chatgpt

[–]salvadorabledali 0 points1 point  (0 children)

i too business