Live data from Hacker News

Electron is flash for the desktop (2016)

josephg.com

311–320 of 1001 posts

Re: Electron is flash for the desktop (2016)

#311
post #232

Earlier quoted context omitted.

Have you been trained as an engineer, in a country where "engineer" is a very specific thing and is held to higher expectations, including the possibility of having your title taken away by your peers if you do not respect your duty to, first and foremost, your users and/or society, like every country that takes the title of engineer seriously? If yes, what in earth makes you think writing Electron apps is a good ide…

> Have you been trained as an engineer, in a country where "engineer" is a very specific thing and is held to higher expectations, including the possibility of having your title taken away by your peers if you do not respect your duty to, first and foremost, your users and/or society, like every country that takes the title of engineer seriously? No country trains software engineers in the way you describe.

All of Europe, also parts of Canada.

No place in the US does, indeed.

Re: Electron is flash for the desktop (2016)

#313

While I love Node.js and its environment, I totally agree with this post. I don't have the Slack client installed for this reason and only use Electron when I write code. React Native seems like a nice middle ground: Javascript, but compiled to native. PS, I notice that the author is using Ghost for the blog, so I am guessing the author is in the same line (like Node.js but not Electron).

Not sure what line that is but Ghost's desktop app is definitely Electron. For the record, it was also built handedly by one open source contributor (Felix Rieseberg) and absolutely would not exist if not for Electron.

Cleared up (I hope)

Re: Electron is flash for the desktop (2016)

#314
post #20
post #18

A lot of Slack's high (background) CPU usage is caused by GIFs, in my experience. Just did a quick check on my quadcore MBP, having Slack fullscreen out-of-view with nothing animated in view gives it a CPU usage of 0,1% with spikes up to 2,5%. Switch to a conversation with a single animated party parrot emoji, go to another fullscreen app once again, and CPU usage never drops below a whopping 22%. For an animated par…

I want to say that VS Code had the same issue because of the blinking cursor, which was controlled by a CSS property to toggle.

I assume that's been patched; I just tested it and VS Code sat at about .01-.03% of CPU with a blinking block cursor (VSCode vim extension. Maybe it's better than the default I?).

I noticed a few moments after startup that the CPU usage jumped to the 5-7% range for a couple seconds, then it notified me that an update was ready (I assume it was downloading/checking/processing that update). I don't know if this is Electron, or just a general trend in desktop apps, but it seems to be getting a lot easier to update them. So when those pesky CPU/memory hog bugs are found, they can be quickly patched. As for the general trade off that comes with running an extra Chromium process, I suppose it's up to users/developers as to whether it is worth it in each case.

Re: Electron is flash for the desktop (2016)

#315
I am a young programmer, student, front end developer/designer, with some knowledge of languages such as java, php.

I am developing one electron app, and it is going great. And I don't even know javascript that much. But in my case, usage of browser engine is essential, since it has to do with rendering HTML and so on. I have less than 1000 lines of javascript and almost everything was working after 2 weeks.

It is not that big of a project anyway, but from the begging I knew that it should be fairly easy and doable.

In fact, I can imagine that I could do so many kinds of apps with electron, and I can easily see how I would approach it.

Let's say music player. No problem. I believe that electron can easily play media, and it would all look great. Or some productivity tool, or note taking app. Working with files, editing text files, even viewing documents like .pdf would be easy (would just use some plugin). Or even embedding youtube videos in notes would be easy. And all that with easy control of layout and great rendering of fonts and images, plus animations.

With little knowledge of front end stuff, and some general programming principles, you can already see how you could build app on the top of electron, which is a platform everyone here knows without even trying. It makes me feel kind of powerful to be able to do such a nice apps myself.

Re: Electron is flash for the desktop (2016)

#316
This is Electron scapegoating. The real issue is twofold:

1. Electron makes it trivial for developers who don't regularly reason about native performance to release desktop apps. The result: a flood of apps that "don't do much" but use more resources than you'd expect.

2. At the other end, Electron makes complex apps easier to build. The Slack app might be low-to-medium complexity, but the Spotify app has a ton of functionality, and I bet dev effort was orders of magnitude lower than for a native app like iTunes. The result: in this day and age, complex cross platform apps with higher resource requirements are more likely to be built with Electron.

In short, there's some selection bias going on in both cases, and it isn't directly related to Electron. Electron is just the enabler.

I agree with the author on point 1: performance matters, memory usage matters, and we as web developers should broaden our horizons and learn lower-level languages. I feel that way regardless of Electron though.

On point 2: I spent the last year building a cross platform continuous sync app (basically, a Dropbox V1) in Electron [0]. We were a team of 2. I also write C and C++ for a living, and I simply can't imagine building the same thing in a lower level language in the same timeframe. It's not just a UI concern either: writing a sync engine in node (the backend half of any Electron app) worked out amazingly well. Node is a great I/O orchestrator. The app runs at [0] https://blend.io/download

Re: Electron is flash for the desktop (2016)

#317

Would it make more sense to distribute electron as a dependency and allow apps to use it? That way, instead of 10 apps requiring 10 different electrons we have 10 apps that can use a pre-installed electron.

Isn't that what Chrome/FF/Safari/Edge/IE/... all do?

Re: Electron is flash for the desktop (2016)

#318

Here's the thing. You know what the alternative to all of these Electron apps coming out is? If your answer is "A native Cocoa/WPF app", you are on another planet, the answer is, "It wouldn't exist at all". Nobody in the last 5-10 years cared about writing Desktop apps before Electron came along, there's basically zero money in it, and it's massively expensive, both in terms of actual dev time per feature (easily 10x…

That's nonsense . Desktop apps have been frequently released since forever. The underlying issue here is that Electron reduces the barrier to entry for cross-platform development . That is, it's cheaper to build a single cross-platform application in Electron than it is to build two or three native applications, and you can re-use your existing web experience. I can completely understand why companies might choose th…

Electron is like almost any other cross-platform VM, including Java (which is living under most of the "native" apps on the world's most popular platform), .NET, and so forth. It doesn't share resources between instances but then you also don't get dependency hell (wrong version of Java for application X, etc.)

Subjectively, I'd say that Electron's performance overheads are not bad compared to, say, Smalltalk in the 90s, where one Smalltalk application could bring a fully loaded state of the art workstation to its knees.

And don't get me started about Flash. I had a whole project cancelled after an engineeer brought up the CPU meter during a fairly simple animation.

Re: Electron is flash for the desktop (2016)

#319

Here's the thing. You know what the alternative to all of these Electron apps coming out is? If your answer is "A native Cocoa/WPF app", you are on another planet, the answer is, "It wouldn't exist at all". Nobody in the last 5-10 years cared about writing Desktop apps before Electron came along, there's basically zero money in it, and it's massively expensive, both in terms of actual dev time per feature (easily 10x…

What planet are you on? I've been using great native apps since forever. I don't know what it is but there is a certain segment of the computer user population who don't seem to notice that awesome native apps exists for all sorts of stuff.

"actual dev time per feature (easily 10x the cost)" Yeah seriously what PLANET ARE YOU ON!!! I can make native app functionality in a fraction of the time it takes to do it in a horrible mess of a language that is JavaScript. Poor type system, shitty REPL, shitty module support, shitty debugger. Shitty GUI design tools. Shitty performance measurement tools.

"And as for Qt, Qt has existed for over two decades" It is C++, and we got great alternatives on Windows and OS X. still if you have to stick to C++, then Qt is probably the most widely used GUI toolkit.

"People are excited about the Desktop again" I don't know what bubble you live in. This is just a bunch of hipsters who are excited because they can suddenly use their only programming skills to hack on desktop apps.

Lets get real, this is all about the numbers and not the technology. Due to the the need for lots of custom made web apps, there is a huge population of JavaScript developers. These can now be utilized for desktop app development. It isn't like it wasn't possible before, it is just that these guys could not be bothered to learn anything else.

And it isn't all that important. Hardly any of the applications I use daily are Electron. I occasionally use Atom. Other than that great apps like OmniGraffle, Pages, Pixen, TextMate, Ulysses, Marked 2, Charles, Dash, Kaleidoscope, Tower, Keynote, GitUp, 1Password, Magnet, iBooks, ScreenFlow, Terminal etc none of them are electron based.

Re: Electron is flash for the desktop (2016)

#320

Earlier quoted context omitted.

Hey, We're French and it's indeed hard for us to get this perfectly right and focusing on the project itself at the same time. We're planning to move this to github in order to let the community help us on this.

Just because I'm curious, why would you not use your native language for the content on your page?

Because English is the most spoken language in the world perhaps? Its even more noticeable in tech, because a lot of docs only seem to be in English.
Post reply on HN