scott113341

Joined 10 years ago

Karma
183
Submissions
35
Member since
Mar 13
https://www.scotthardy.me https://github.com/scott113341
View on Hacker News

Recent submissions

Comment · 10 months ago
Comment · 1 year ago
Comment · 1 year ago
Comment · 4 years ago
Comment · 4 years ago
Comment · 4 years ago
I was actually thinking about Tay-Sachs this morning on a walk, after I passed by a church with a billboard out front that says "Christ died for all, even babies in the womb".

I learned about Tay-Sachs in high school biology. I think we watched a short documentary on it, as an example of genetic inheritance, and the importance of enzyme function. I remember being so surprised that something so simple (absence of one protein) could be so horrible. A beyond-grim prognosis, and immeasurable/unavoidable suffering for everyone involved. Since then, it's been something that I can't reconcile with the existence of a higher benevolent being. I'm no expert, but it made a lasting impression on me.

I'm so uplifted that researchers have made progress on curing this senseless disease.

Comment · 5 years ago
I’m a huge fan of Postgres. This one is “user error”, but we still got bit pretty hard.

A query plan changed, on a frequently-run query (~1k/sec) on a large table (~2B rows) without warning. Went from sub-millisecond to multi-second.

The PG query planner is generally very good, but also very opaque. The statistics collected during an ANALYZE and used by the planner are subject to some significant caveats. Essentially, the planner would sometimes wildly mis-estimate costs due to under-sampling, and would choose a bad plan. We fixed it in two different ways: 1) lower the auto-ANALYZE threshold; 2) increase the number of rows sampled when collecting statistics for the relevant column.

Again, this was “user error”. That said, it will probably happen again on the same or another query, because it’s hard to know if/when a query plan is about to change, and pg_hint_plan and similar are very heavy-handed solutions.

Comment · 5 years ago
One strategy I've found useful when asked for an estimate is to ask back: "What do you need the estimate for?" Often, this leads to a useful discussion, and we can discover things like:

- They don't actually need to estimate, because the task can very obviously be completed by the previously window

- They're simply trying to prioritize two different features, so the estimate doesn't need to account for who will be working on the project, known vacations, meetings, etc.

- The business is trying to use the estimate for strategic planning, so high-confidence, or multiple estimates (optimistic/normal/conservative) are actually needed.

It's similar to when someone comes to engineering and asks "Please build this button for me" - it's always crucial to ask "Why?" and understand the problem they're trying to solve, since often what they've asked for is not what they need.

Comment · 5 years ago
Comment · 6 years ago
I've been kicking around a related idea for a while. A static "death day" is great because you can internalize, and countdown towards it, but it loses the distribution behind life expectancy. A single day is probability's expected value, but there's a huge range of days that could be your last - even today!

My idea is a daily (or weekly/monthly/etc) notification that re-computes a "death day" for you, on that recurring basis. Each notification would include a day, and together, they'd form a distribution that faithfully represents the variance in days you're likely to die.

For example: me; 28-year-old male. I'd regularly get "death days" that are ~50 years out. Occasionally, maybe they'd be 25, or 55 years away. And very rarely, they'd be things like 10, or even 5 years away. A perfect reminder to play hooky, or call up a friend, or tick off a bucket list item every once in a while!

Anyone interested in this? I'm kind of fishing for an excuse to build it...

Comment · 6 years ago
Comment · 6 years ago
Comment · 6 years ago
Comment · 6 years ago
Comment · 6 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton