Hacker News new | ask | show | jobs
by wilkystyle 3132 days ago
As someone who doesn't particularly like Electron, I have an honest question: Why all the hate?

Sure, it's slower and less resource-efficient, but is anyone making you use it?

Yes, it makes it easier to "just use your web developers" instead of hiring native app devs, but how many of those apps would even exist if the only path was to develop a native app?

Electron is too slow for me, so I just stick to e.g. Emacs and Sublime text. Other people get along just fine with Electron, and love VS Code.

Why can't it be fine for people like what works for them?

5 comments

I have a Surface 3. It has enough memory for my web browser, but not much more. Atom is out of the question, Spotify grinds it to a halt, slack is a horrible experience.

But you know what works great? Emacs, a shell, Python, video players, bittorrent, ffmpeg. I. e. native apps.

Well, that sucks for me, right? I could just hop on my 64 GB, 32-thread desktop PC right? As a matter of fact, I could, because I am an entitled white western dude. But the rest of the world can't. I wonder how the Atom vs Emacs debate plays out in China or India or Africa.

> As a matter of fact, I could, because I am an entitled white western dude. But the rest of the world can't. I wonder how the Atom vs Emacs debate plays out in China or India or Africa.

So there will be companies writing less demanding software for less developed countries that will reap all the market, audience and benefits, right?

This is similar to the diversity argument: "hiring a diverse team is beneficial! only staying diverse you can have innovation" is similar to "billions of people are stuck with slow hardware and ancient OSes - these are the markets of the future".

Guys, why don't you all form a diverse team, go capture the market of the future and become billionaries in the process while we keep on writing Electron apps? Sucks to be us, right?

> Why all the hate?

Because it's simply offensive to me as a computer scientist and software engineer to use most of the resources of a 3GHz processor and 12GB of RAM doing something that really can be easily done with a processor 1000x slower with 1000x less RAM. I'm willing to accept a certain amount of overhead for modern user interfaces and cross-platform capability, but three orders of magnitude wastage is ridiculous. It literally offends me.

Perhaps you're being hyperbolic, but can you give an example of an application that runs more or less the same functionality and performance on a 30 MHz processor with 12MB RAM (a high end computer from the early 1990s) as a 3GHz processor with 12GB of RAM (a high end computer from 2017)?
I'm guessing you're not very old. Interleaf on an original MC68000 Sun workstation. The Symbolics Genera IDE. Pretty much every app on an Amiga or Mac II circa 1990. Most of these apps were more responsive and more capable than Electron with single cores and 1/1000 the resources. Making clickable animated widgets on a windowed screen that tightly integrate with the OS doesn't (or shouldn't) take much software. But we seem to have forgotten that.
I understand the hate. It solves the problem like hammering a nail with a wrecking ball. But having said that, I'm actually using it right now. Mostly because I already know when development and I don't really have the time to learn GUI libraries, also I can get up and running with a workable UI in less than a day with electron. However I just discovered sciter and might use it for my next project.
One issue is that Electron apps don’t get browser security patches until Electron updates Chromium, the developer updates Electron, and the user updates the app.
While that's true, electron apps very rarely provide unrestricted web browsing of untrusted content. They're usually locked to a single domain, or load their entire interface from local files.
This doesn't make it safe -- consider a lower level library inside Chromium can be exploited when processing input data. Your chat app can be exploited by receiving a crafted image. This actually happened in image processing library and network library in Chromium.
Sure, but the same can happen to whatever libraries you use on your native app. If anything Chromium is more likely to be patched, since there's a large entity interested in keeping it secure enough for accessing untrusted content.
>Sure, it's slower and less resource-efficient, but is anyone making you use it?

Yes. Is impossed on the users by the developers using it.

You can just use an alternative. If the company you work for is mandating that you use specific tools, that's a different issue, orthogonal to electron.
Which alternative can be used if the app is made only with electron?

No all apps have multitude of implementations.

>Yes. Is impossed on the users by the developers using it.

No more than chocolate is "imposed" on people consuming it by the chocolate manufacturers.

And yet is still correct to point this.

We decide what to imposse on the user by the choices we make.