HNHacker News
TopNewBestAskShowJobs

korm

345 karma · joined August 12, 2015

submissionscomments
korm··on The UK's Teen Social Media Ban Is Political Theater, Not Child Safety Policy
It's interesting to see UK-based influencers all citing these weak studies (internet surveys) about how social media is not so bad for children, or bemoaning the huge loss for children whose access to educational videos will be cut.

While the financial motive is clear, they must all believe it to an extent, because social media made their careers and changed their lives.

The reality is that the vast majority of kids aren't interested in learning video editing or movie directing, they are mindlessly consuming AI-generated videos and similar content served to them. 30-second videos on random facts sprinkled here and there aren't education.

Not that I think this ban will help, but downplaying the harm to children is a bit too much coming from people with ties to these platforms, like the author of this article.

korm··on When AI 'builds a browser,' check the repo before believing the hype
From an engineer working on this here on HN:

> ...while far off from feature parity with the most popular production browsers today...

What a way to phrase it!

You know, I found a bicycle in the trash. It doesn't work great yet, but I can walk it down a hill. While far off from the level of the most popular supercars today, I think we have made impressive progress going down the hill.

korm··on Cloudflare was down
Yep, every SLA I've ever seen only offers credit. The idea that providers are incentivized to fudge uptime % due to SLAs makes no sense to me. Reputation and marketing maybe, but not SLAs.

The compensation is peanuts. $137 off a $10,000 bill for 10 hours of downtime, or 98.68% uptime in a month, is well within the profit margins.

korm··on RCE Vulnerability in React and Next.js
It's not a transitive dependency, it's just literally bundled into nextjs, I'm guessing to avoid issues with fragile builds.
korm··on The lazy Git UI you didn't know you need
Gitkraken is the best, and I can't believe anyone would voluntarily use Sourcetree over it.

I've used gitkraken for over 9 years and it's great for both newbies and pros.

It completely solves the problem with new or intermediate devs, who are not used to working in a sizable team, constantly needing hand-holding.

Lots of people resist adopting it at first, but not one has regretted it so far. It usually goes like this:

1. "No I won't use it, the terminal is better"

2. Mess up

3. Finally give gitkraken a serious try

4. Realize they didn't really know git

korm··on Bypassing GitHub Actions policies in the dumbest way possible
GitHub has both webhooks and an extensive API. What you are describing is entirely doable, nothing really requires GitHub Actions as far as I know.

Most people opt for it for convenience. There's a balance you can strike between all the yaml and shared actions, and running your own scripts.

korm··on Have I Been Pwned 2.0
They must have not asked enough Leetcode Hard questions in interviews.
korm··on Critical CSS
The mod_pagespeed filter "prioritize_critical_css" was released exactly 12 years ago in early May 2013. At least 3 more popular critical css tools were released the following year, integrating with Grunt, Gulp, and later Webpack.
korm··on Knowing CSS is mastery to front end development
It's a bit like the <center> tag. A codebase that's littered with stuff like "InlineStack" is harder to work with and parse because the resulting div soup still requires extra styling, which is now both markup and CSS.
korm··on Sunsetting Create React App
React was literally first created in ML out of the author's dislike of MVC, who preferred functional programming and immutability[0]. For a long time, react aspired for its future to be in ReasonML.

Hooks came as no surprise to anyone who paid attention, as the recommended way to write components since at least 2016 was in the stateless functional style whenever possible, and many of us used recompose[1] to simulate hooks long before their introduction.

[0] https://github.com/reactiflux/q-and-a/blob/master/jordan-wal...

[1] https://github.com/acdlite/recompose

korm··on Trump wins presidency for second time
> North Korea didn't fire a single missile

https://en.m.wikipedia.org/wiki/List_of_North_Korean_missile...

> Russia didn't invade Ukraine

Russia invaded in 2014 and the conflict stabilized (but didn't stop) in 2015.

In the meantime, the Syrian civil war was raging on.

Similarly, if we ignore all the events in the prelude to WW2, the world was a very peaceful place. According to Hoover, Roosevelt was a threat to world peace, not Hitler.

I'm not implying anything with the analogy, I'm only trying to illustrate that the world was not peaceful between 2016 and 2020, despite the president's efforts.

Perhaps if we had gotten 2 consecutive terms, it might have provided more long term stability.

korm··on Final two communications from MH370 support controlled descent scenario (2021)
The crew had 13 hours of oxygen supply for two pilots.
korm··on An experiment in UI density created with Svelte
If seeing how common `eslint-disable-next-line react-hooks/exhaustive-deps` is any indication, people just don't bother with best practices. Not to mention the majority of people I interview or hire don't know anything about CSS performance, they learn on the job. They'll happily add 1000 box shadows in a view if it's in the design.

Also OP is looking to move an existing React UI to Svelte, why not try Preact first instead of an entire rewrite? Or even Inferno or million.dev? If they did and they're insufficient, I don't even believe the browser's DOM is the right technology for that UI then.

korm··on Aegis v3.0 – a free, secure and open source 2FA app for Android
Not only did your tool help me with Aegis & Keepass, but it introduced me to Go, so thank you 2x for it!
korm··on Aegis v3.0 – a free, secure and open source 2FA app for Android
Here's a utility to convert exported Aegis JSON to a Keepass 2 or KeepassXC database if anyone's interested https://github.com/GeKorm/atk (binaries in the releases page)
korm··on 15 years ago, I helped design Google Maps
Search: "pizza", filters: 4.5+ star rating.

Result: Zoom out, show 10 places with ratings starting from 1.5, among them a nail shop and a government building. If I'm lucky, it will also show the 4.7 star pizza place 2 blocks away, for which I needed directions.

korm··on Retries – An interactive study of request retry methods
The client can track its own error rate to the service, but it would need information from a server to get the overall health of the service, which is what the author probably means. Furthermore the load balancer can add a Retry-After header to have more control over the client's retries.
korm··on Best Night Vision vs. Darkest Room [video]
It's confusingly presented in the video, but they already work in the near infrared, up to ~900nm. They're used with IR illuminators and lasers all the time.

There are tubes that work on a wider spectrum, like the Photonis 4G tubes from UV to IR 350-1100nm. But I found them dimmer than the L3Harris in the video.

korm··on Why Git Is Hard
Exactly, clicking on the commits I want to cherry-pick is way faster for example.
korm··on Why Git Is Hard
My comment is in agreement with yours! I'm just expanding on how absurd it is to struggle with merge because GP didn't know about a simple --abort, and how common it is even with senior devs.

And yeah I too find a mix of GUI and CLI works great.

korm··on Why Git Is Hard
It's so frustrating when people joining my team often scoff at the idea of using a git GUI.

They're hired to write software, not fumble with ancillary tools that they've been using incorrectly for over 10 years.

Either use the cli effectively, without messing up simple tasks, or use a gui that will teach you how.

There's surprisingly a lot of resistance even though we provide Gitkraken licenses for free.

To be clear, we have a few people using only the cli, we don't bring this topic up unless it's a problem.

korm··on Valve releases Counter-Strike 2
My experience is that there were tons of cheaters in the middle, most populated ranks, and it cleared up at Global, or at least the cheats were subtle.

I am certain of this because I climbed to global a few times, and I was tracking VAC bans in my game history. In the top ranks, every other game eventually had a player get VAC ban days or weeks later. In the middle ranks it was one or more players every game.

However the cheaters bothered me less than having to play the team's therapist in every game the moment we lost one round!

korm··on Study links blue light from smartphones or tablets to early puberty
> there is no good evidence that filtering blue light with spectacles...

That's likely referencing this recent review[1]. The products referenced don't actually reduce blue light by much, which you can confirm in the studies. The lenses look transparent, not amber in many cases. Which makes sense because they're meant for all day use, but it's just a marketing thing.

If you bought glasses in person in the last 10 years, they probably tried to upsell a blue light or "screen strain reduction" filter.

It's a stretch to hold this as evidence that blue light doesn't affect us.

[1] https://doi.org/10.1002/14651858.CD013244.pub2

korm··on Things you forgot (or never knew) because of React
I'd be frustrated with React too if I worked in team where these things are not well understood.

You don't need to read "multiple articles" about these things, they're explained clearly in the docs

- https://react.dev/reference/react/useMemo#memoizing-a-functi...

- https://react.dev/reference/react/useCallback#how-is-usecall...

- https://react.dev/reference/react/useEffect#specifying-react...

To answer OP's questions, useCallback is

  function useCallback(fn, dependencies) {
    return useMemo(() => fn, dependencies);
  }
As for useEffect, everything that might change between renders, eg props used in the effect, must go in the dependency array.
korm··on Windows NT on 600MHz machine opens apps instantly. What happened?
Nothing to do with React, it's a common optimization to improve performance with long lists. You only render the dom elements in the viewport, with some buffer. A common technique to achieve that is called "virtualization" or "windowing".

It's common enough that there were a couple browser proposals to deal with this and would address the Ctrl+F issue. I believe this has been merged into the CSS Containment spec, but at the moment it doesn't make windowing obsolete in every situation.

korm··on The brand new Thunderbird logo
I always saw Nicolas Cage with bird hair https://i.imgur.com/tRCXkzp.jpg
korm··on SoftBank Vision funds post record $39B annual loss
Must have been a black cab. I just checked and I can book a regular cab for £30-40 depending on the company, while Uber charges £48-55 between 19:30 and 00:30 for the same trip.
korm··on SoftBank Vision funds post record $39B annual loss
Not OP but it is often the case around London, UK. Half price isn't an exaggeration! Better cars usually too.
korm··on Ancient Greek terms worth reviving
> 50 to 100 grams

Saffron is toxic at that dose, very likely lethal. Please stay safe.

korm··on A detailed comparison of REST and gRPC
I've been disappointed with almost every OpenAPI spec I've come across for this reason. They're OK for documentation but can't auto generate clients due to errors.
Page 1 of 4Next →