s-km's comments

s-km | 5 years ago | on: Ask HN: Do you miss Steve Jobs in 2020?

The dude believed in a bunch of random quackery and essentially killed himself because of it. Was diagnosed with some kind of rare cancerous tumor and ignored it for months, trying out veganism and fad diets for some reason instead of just listening to his doctors.

I'm pretty Jobs would be doing the exact same stupid shit Musk is, just without the weird twitter meltdowns I guess.

s-km | 5 years ago | on: Reason React 0.8

What do you mean? Typescript by default assumes non-null, and if you specify that something can be null it'll force you to check that it isn't before attempting to access it.

s-km | 5 years ago | on: Coming to Chrome: a new way to use tabs

Tested this out a few months ago, got real excited when I saw they had a beta thing for it but was let down that you couldn't collapse and expand tab groups down to just their titles. The functionality should even be there-ish already, since pinned tabs collapse down to just the site's favicon.

s-km | 5 years ago | on: Second-Guessing the Modern Web

This is pretty much it, tbh. Every time one of these types of threads pop up you get a bunch of people commenting about how broken the web is and how it sucks because front end devs aren't real devs or something, and it's immediately clear to me that none of them have done any serious work on a modern website.

The problem is a business/orgnanizational problem - it's not like developers are incapable of mimicking their own websites with pure html+css+js (especially with all the improvements to JS and the browser apis over the years), it's that doing that and then maintaining and growing it with a team of people is basically impossible at any useful scale.

Frameworks provide a common language for teams to build their site with. The fact that they also currently introduce a lot of extra complexity that require developers to handle previously "free" things (ex. performance, bundle splitting) isn't some fundamental flaw with the idea of frameworks, it's just a result of people still trying to figure out exactly how the hell you can provide a nice, interactive site with all the bells and whistles that'll make like 5 different groups of stake holders happy.

s-km | 5 years ago | on: Rebuilding our tech stack for the new facebook.com

React components aren't a 1:1 mapping to the DOM, so you could in theory have 50 HoCs wrapping a single component and it still only output one div or whatever.

Also, HoCs have somewhat fallen out of favour over time, with hooks and the child as a function/render prop style becoming more popular. I think the only HoC I consistently use these days is `connect` from `react-redux`.

s-km | 5 years ago | on: Bringing GNU Emacs to native code [video]

does it do anything to change/fix Emacs shitting itself on large buffers?

last time i gave it a try opening a large file would completely kill performance, and iirc in particular really long lines (ex. 1000+ chars) would make the thing chug even if the actual file wasn't super big or anything.

s-km | 5 years ago | on: Java Feature Spotlight: Text Blocks

What about switch expressions in Java is better than Kotlin's when? I haven't personally used switch expressions in Java yet, but I've read the JEP and I don't see anything special or interesting.

s-km | 5 years ago | on: A Critique of React Hooks

>It's unreal that in React I have to deal with occasional infinite loops now because of hooks. Sure, React catches the loop cycle so things don't totally freeze but I don't recall ever having to deal with this before them ... missing dependency accidents requiring linters to prevent

Infinite loops and missing dependencies are/were issues with `componentDidUpdate`/`componentWillUpdate` and `componentDidMount` as well, though. On the plus side, you now have a linter which can both point out these errors and automatically fix them for you. I agree that the whole thing is a bit leaky and dumb though, but there's no way to fix that without introducing some sort of compilation/optimization step and afaik the React guys aren't really considering that at the moment.

>Weird, unexpected reference issues

Not sure I've run into this before. Do you have any examples?

>strange programming patterns, a team member having to write a terrifying novel

The first bit seems like personal preference or something, not sure what you're referring to as strange. The `useEffect` novel exists because a ton of people had built up their (incorrect) mental model of how React works with lifecycle methods and were making mistakes or running into unexpected behaviour because they assumed `useEffect` was the exact same thing as `componentDidMount`.

s-km | 5 years ago | on: Learning Spring with Kotlin – Sprint 0

I'm of the opinion that Spring is 100% unnecessary and pretty much in all cases just straight up a bad choice. There's a ton of great companies that are built on it and depend on it, but man is using it unpleasant to say the least.

Admittedly I haven't looked at Spring w/ Kotlin at all, but I can't imagine it would solve fundamental annoyances I have with it (Why can't I capture logs globally while actually handling my exceptions locally?).

IMO the best library for Kotlin web stuff is http4k. Really nice documentation, first class integration for marshalling JSON with Moshi instead of Gson/Jackson, and very good, up-to-date consistent documentation.

s-km | 6 years ago | on: Converting an old MacBook into an always-on personal Kubernetes cluster

What sort of fun projects/experiments do people do with a super low powered k8s cluster locally?

I'm kind of in this weird position where I understand the benefits and use of k8s, but I:

a) Can't think of any cutesy distributed systems/microservices type thing that I could or would want to run on a low power machine locally (lack of processing power or ISP getting pissed off @ massive amount of traffic if you're e.g. scraping a ton of data and doing stream processing on it in your little cluster)

b) Don't really understand the point in investing time in it, as it feels like one of those things you learn on the job as it comes up. And for a lot of people (the majority, probably?) it'll probably never even come up unless they just are hunting for new tech to introduce at work regardless of if the business actually needs it. Which IMO, most businesses don't even have a compelling reason to switch from the old 3 tier monolith architecture.

page 1