Recent submissions

Comment · 5 years ago
Yeah but they’re not necessary for selection. Label elements actually need an input with ID to function. The other useful use for IDs is for deep-links in articles.

But then again that doesn’t mean the id should be used for selection (in JS nor CSS) as it’s probably easier to target many elements with a class, should they ever co-exist. This is basically what you end up with if you build components anyway (even without specific frameworks)

Comment · 5 years ago
A few minification transforms actually kind of speed code up. If Babel hadn’t turned into a hydra this kind of transforms would have been right up its alley.
Comment · 5 years ago
I know, that's why it's misleading and it should not be considered. A quick reader will think that "using getElementById will save me 32ms", but it'd be off by several orders of magnitude.
Comment · 5 years ago
Please don't listen to this, it's misleading.

querySelector *does not* take 62ms to run. Both of them take 0.01ms at most, try it yourself. This is the sort of micro optimization you should not concern yourself with.

How often do you need to select unique elements by ID? Don't use IDs in the first place.

This is akin to using `i--` in loops to "speed up your code" — we're past that.

Comment · 5 years ago
> It's why we get things like Deno, which attempt to throw all this cruft away and start again

Doubt. Your "[email protected]" in Deno is no different than "something": "^1.2.3" in npm. The problems will appear when you update stuff.

The only thing benefiting deno currently is the clean slate and the lack of hacks (for now).

Comment · 5 years ago
Yes, that’s what doesn’t work on my computer.
Comment · 5 years ago
That's not true, I can replicate it in Chrome 96, macOS 11. It doesn't seem to work in Firefox though.
Comment · 5 years ago
This is an old article and I think designers kinda stopped doing this because its effect is not as pronounced on high-res displays.

Either way, 100% agree. Stop trying to change a OS’s text rendering, if you still are.

Comment · 5 years ago
Most people are ignorant about Bitcoin and its risks; The fact that there are no protests should come as a surprise to no one.

What people see is that they get free money from the government and maybe they’re lucky to see it go up. They don’t know it could be half tomorrow.

Comment · 5 years ago
I’m a normal user and I can see their message. Has it been vouched for in the past 4 minutes? My settings are still the HN defaults.
Comment · 5 years ago
Sounds like you never used Vercel now AWS. I wouldn’t call AWS “super trivial” nor is Vercel equivalent.
Comment · 5 years ago
I’m confident it’s two reasons:

- too many street names make for a noisy/busy/ugly map, and we all know maps must be beautiful and nothing else

- streets don’t pay for ads, businesses do, so between the two they prefer showing the latter.

Technically now you can tap anywhere on the map once to place a pin and get more info; In practice tapping in Google Maps has become horrendous, it never does what you expect. One such example is tapping on a business near a “walkable area”: you can’t. The area will always focus instead, even if painted behind the business.

Comment · 5 years ago
I remember some browser blocking that at some point, but I still occasionally see it. I can’t believe there’s no way to “go back to the previous website” in most browsers. Safari iOS for example just clips the history so you can’t even hold the back button and scroll up if there are dozens of entries.
Comment · 5 years ago
Have you tried turning it off and on again?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton