Recent submissions

Comment · 3 years ago
Damn those ageists specifically refusing to hire 50 year old black guys and 50 year old hispanic guys!!!
Comment · 3 years ago
Does the field of AI safety apply here?

Here is a legitimate case of people using artificial intelligence to facilitate murder... and people are mad it didn't comply?

Comment · 3 years ago
I wonder if the new stdlib logger is featured enough to get rid of logrus/zerolog.
Comment · 3 years ago
Oh that's right. I imported it via golang.org/x/sync/errgroup
Comment · 3 years ago
For #3 you can also use errgroup from sync/errgroup. It's a nice recent addition to the stdlib.

For #4 wrapping your errors creates pretty and logical error messages for free. It should be done in most cases.

Comment · 3 years ago
How can clicking an HTML element root my iPhone?
Comment · 3 years ago
1. No it would not be expensive. Writing metrics is literally free: https://cloud.google.com/stackdriver/pricing . If metrics didn't exist yet then log 1/1000 requests to control the log volume and find the pattern from the averages.

2. It isn't up to google to tell you if you are querying against the cache or the DB. It's your code. You should know. Just tick something when you use the Redis/BQ/GCS/SQL client.

This task is so easy I would assign it to a junior engineer and expect code changes done in one day!

Comment · 3 years ago
I think it's negligible. The only metrics you lose are on rare scaledowns and they are averaged out anyways. GCP likes to keep instances idle for a long time.
Comment · 3 years ago
You have to implement that with your own code but it isn't much more than a dict/map and a timestamp for last update.
Comment · 3 years ago
This medium article seems silly, just add custom metrics to your app for what was fetched from cache vs DB. And label the metric by route/query/pattern. To control costs, don't tick the metric for every single request, instead accumulate locally and post to metrics API every X minutes.
Comment · 3 years ago
This article seems silly, just add custom metrics to your app for what was fetched from cache vs DB. And label the metric by route/query/pattern. To control costs, don't tick the metric for every single request, instead accumulate locally and post to metrics API every X minutes.
Comment · 3 years ago
Cloud is not difficult, they just charge too much per API request.
Comment · 3 years ago
Because Adderall is 100% pure speed. A handful of Adderalls is more fun than a bag of cocaine (which is going to be more like 5% purity and adulterated with god knows what).

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton