Live data from Hacker News

Electron is flash for the desktop (2016)

josephg.com

451–460 of 1001 posts

Re: Electron is flash for the desktop (2016)

#451
post #268

Earlier quoted context omitted.

> ... Electron applications are shite in comparison with proper native applications. Is that true from a user's perspective? The average user I know would not have the idea that Slack is somehow inherently worse than say MS Word or any other truly native app they use everyday. What would Slack gain by integrating better with my Mac? Slack starts up too fast for me to read the little quotation (penultimate Macbook Pro…

I totally agree with you. I only use Slack from we app but I'm a heavy user of VSCode and Spotify. I believe in standardized Web API's rather than a clusterfuck of native API's. The problem here is the base platform Electron and underlying Chrome/Nodejs But as consumers we feel when our browser lags, so browser vendors optimize speed over memory and cpu, caching the shit out of everything. The Web is a dangerous plac…

[deleted]

Re: Electron is flash for the desktop (2016)

#452

People complaining about electron are the same type than the ones that used to say : - why are people writing this stuff in C. It's so slow and you don't have as much control on memory. Write it in Assembly. - why are people writing this stuff in Java. It's so slow and you don't have as much control on memory. Write it in C. - why are people writing this stuff in Python. It's so slow and you don't have as much contro…

> why are people writing this stuff in C. It's so slow and you don't have as much control on memory. Write it in Assembly. did anyone ever actually say this? > why are people writing this stuff in Python. It's so slow and you don't have as much control on memory. Write it in Java. this one is odd to me considering Python came first...

>> why are people writing this stuff in C. It's so slow and you don't have as much control on memory. Write it in Assembly.

>did anyone ever actually say this?

Yes, in the 8bit era.

Re: Electron is flash for the desktop (2016)

#454
So many divisive opinions here, but in case anyone reads this far down, here's my 2 cents:

- Yes, desktop apps existed before Electron. But the top comment is right. How many desktop apps. NOT utilities but full featured apps (like Spotify and Atom) that you loved either got swallowed up by other companies (Mailbox) or discontinued due to "lack of use" (read: lack of profitability). I'm sure if you dig deep you can remember quite a few...

I'm a game developer with a background in C++. But I'm developing my company's prototype in electron. This is because I can do it myself without needing to tap a bunch of people to help and find funding. I can bootstrap. Electron allows this and it's incredible. I couldn't make a cross platform game engine in a year on three platforms using native. Maybe you can and you're just a better human/coder than me (but seriously, email me in a year with your progress!) but Electron is allowing it.

What does this allow? This allows me to release a product (yay) and maintain a product easily (double yay!) and when you guys don't throw money at me.... I can KEEP maintaining it because of my low overhead. With native code and a staff of 20 I would be forced to shut down the product.

THAT BEING SAID

If the game does well? I'm not only using Electron, I'm using React (yes, it's a game. Yes I know, I've had this discussion. I'm crazy) so the next step is to port it to react native on the desktop and remove the Electron dependency. Totally doable since Microsoft is supporting it on the Univ. Windows Platform (https://github.com/Microsoft/react-native-windows) but macOS? Someone's working on it but it's of course not apple (https://github.com/ptmt/react-native-macos). Ubuntu is on top of shit though (https://developer.ubuntu.com/en/blog/2016/08/05/introducing-...)

I can't speak for Spotify or Slack or any of the people mentioned (yes I know Spotify isn't using electron) but for a small company of 1 and a half people Electron is allowing innovation and project completion in a way that nothing else is for me. It's a great door to open to allow future optimizations. And hey, maybe Electron will slim down too... give it time. Remember how bad Windows development was? No? I do. But .NET has come a long way, maybe electron will too. If not, we can always port!

Re: Electron is flash for the desktop (2016)

#455

People complaining about electron are the same type than the ones that used to say : - why are people writing this stuff in C. It's so slow and you don't have as much control on memory. Write it in Assembly. - why are people writing this stuff in Java. It's so slow and you don't have as much control on memory. Write it in C. - why are people writing this stuff in Python. It's so slow and you don't have as much contro…

The flip side perspective of this is that end users are forever plagued with poorly-performing/behaving software, because developers favor their convience over user experience by continually moving on to new technologies before they're mature enough to be satisfactory replacements of the old stuff.

But the majority of users/clients/bosses won't pay for better software. They want it now, for free.

The market is asking for more and more software, with more and more complex features. And they must be usable on many platforms, by users incapable or writing their name correctly, let alone comprehend a computer.

In the mean time you have a bit more trained programmers, but not that much more. And most of them are not remotely good enough to provide fast, reliable and usable software. The ones that can are expensive.

In this situation, any shortcut you can take, you take.

It's like the quality of food or kitchen wear. You want 1000 of fruits available all year long ? Ok, but the quality will suck. You want everybody to be able to afford 10 machines to do every single things instead of you. Sure, but they'll break in 2 years.

My mothers kept her machines for 20 years, and I can seldom keep mine for 5. I eat tasty tomatoes 25 years ago. Today I have to look for them with expert knowledge and a bag of money or they'll taste like plastic.

As long as everybody wants a piece of the cake but nobody wants to pay for quality and don't want to wait, well, you'll end up in those situations.

For software, this is only going to get worse. Every year, I get paid more and more, I accumulate more knowledge that the newcomers are struggling with. I refuse work. And I don't get penalized for any shortcut I take.

This situation is not going to end well.

Re: Electron is flash for the desktop (2016)

#456
post #344

Earlier quoted context omitted.

Vim and Emacs are probably much slimmer, but a comparable GUI editor- Sublime Text, is using 311 megabytes for just one window of a folder that has 200 files in it.

> much slimmer Yeah... I opened a 500KB log file in vim and Notepad++ and they are using 5 MB and 7 MB of RAM, respectively. They both also manage to use no measurable amount of CPU (even to blink the cursor!) unless you interact with the window.

But - can I get a copy of Notepad++ on my Linux box? No?

Now - I know there are a ton of other options for Linux, but the thing is, I can't jump from system to system and have the same app with the same experience - even if the app was developed as a native app for all of the platforms, because each has a slightly different native GUI implementation and usage which doesn't translate fully between each.

So now I have to learn and use potentially three or more different programs/apps/whatever to do the same task. Or, I have to remember the quirks for each native implementation.

...and let's be honest: Not many companies out there are going to develop a native version of the same app for all the platforms, because most platforms have a lower number of users than others (in many cases, much lower - depending on the genre of the app in question - like games).

It's an economic tradeoff: We either get a balkanized system where for certain kinds or types of apps we need a particular machine for the native implementation, or we have the case of these larger cross-platform apps that anyone can use on any system, in the same manner everywhere.

Here's another thing - most of these complaints seem to have to do with laptop users. I don't really worry about these issues on a desktop, because there I can have a ton of memory and way more CPU than what I can get in most laptops, and I don't have to worry about battery power.

But for those who are stuck with laptops - maybe they need to bother manufacturers to increase the amount of RAM and CPU available, to handle these larger apps.

It's also funny that I hear people complain how these apps are too big, and use too many resources for editing text or whatnot; you make the case that vim and notebook++ use only a few meg of memory, and no CPU.

I tend to wonder how well they'd fair on my old TRS-80 at home - you know, I had a full-screen text editor on it that didn't use much CPU (sub-1 MHz) nor memory (less than 64K) - so why can't we return to that?

Honestly - I don't want to; but we can take this argument down the rabbit hole, because the argument that today's stuff is bloated compared to another case, can easily be made about today's stuff vs older stuff. Most of that bloat of your "smaller" example comes from abstraction; the same as the "new bloat" - not many years ago a program taking of 10 MB of RAM would have been insane. Today, it's normal and expected.

I daresay that in the very near future, programs taking up several hundred meg to a gig or so will also seem normal, because by then we'll have even better CPUs (with maybe hundreds or thousands of cores) and way more RAM (terabytes).

Some might argue that this is the case today, in the form of cloud computing and SaaS - browser-base stuff, in other words.

Re: Electron is flash for the desktop (2016)

#457

Earlier quoted context omitted.

No, and that's fine. I don't think anyone is going to begrudge a small team the power of developing a 'desktop' application using cross-platform tools like that. It's great that the barrier to developing an application in that way is lowered. But that doesn't excuse the abuse of that platform. Spotify used to have a pretty convincing native Mac app, which was spiked in favour of their current abomination, and I've wa…

Electron is great for user experience. Compare to something like JetBrains' IDEs which are written in Java and are much less native feeling than Atom (and just as resource-hungry).

To be fair though, Java and Swing which JetBrains IDEs use are also not exactly native.

Re: Electron is flash for the desktop (2016)

#458

Earlier quoted context omitted.

> Nobody 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 the cost), and also in finding specialist developers who know these dated technologies. Clearly Java never existed. I've been experimenting with Swing lately because Java has a library I'm interested in using. It's a breath of…

> It may not be proper "native" development, but I don't have to deal with hell. It has proper layout management If you want something that's much closer to proper native, have a look at SWT. It's faster than Swing and actually looks/feels native since it's actually using native widgets. It's really a shame that the poster child application, Eclipse, is so bloated and slow, because people attribute that slowness to S…

Thanks for the tip. I'll have to look into SWT. I only chose Swing because it was included by default, but I would prefer to have the actual native look on each OS.

Re: Electron is flash for the desktop (2016)

#459
post #196

Electron is just another proof that ease of programming matters. Node.js too was a terrible idea. Who in their right mind would write server-side javascript? It turns out: pretty much anyone who didn't want to have to screw around for hours before being able to respond to a simple http request. Similarly, it is way harder to write a desktop app than a browser app. DOM / CSS manipulation, however bad they are, are yea…

> Node.js too was a terrible idea. Who in their right mind would write server-side javascript? It turns out: pretty much anyone who didn't want to have to screw around for hours before being able to respond to a simple http request. Pretty sure you could do that as easily in PHP, Ruby, Python, Perl before Node. > And what about Python for data analysis? The one language that is known to be 10x slower than C becomes t…

> Pretty sure you could do that as easily in PHP

PHP is awful but still the best option for making something simple very fast, as it is supported virtually in every kind of provider, even free ones.

Re: Electron is flash for the desktop (2016)

#460

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…

[deleted]
Post reply on HN