Live data from Hacker News

Electron is flash for the desktop (2016)

josephg.com

681–690 of 1001 posts

Re: Electron is flash for the desktop (2016)

#681

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…

> 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".

This comment is completely wrong. You know what Slack was before it was an Electron app? It was a Cocoa app. Sure, it wrapped a WebView, but given Slack's nature that's not a surprise. Regardless, the Cocoa Slack app, while not great, was still much better than the Electron crap we have now.

I don't know if you're simply ignorant of the fact that the app this article is focused on actually was a native desktop app before it switched to Electron, or if you're just ignoring that pretty important information in order to try and make your point, regardless of whether or not it's true.

Re: Electron is flash for the desktop (2016)

#682
post #254

Earlier quoted context omitted.

The other thing I find ionic about this whole article is that it's perfectly easy to only use Slack within Chrome as a normal web app. And the UI is almost exactly the same because it's nearly all the same code. So if the Electron bloat is such as issue for you, just hit Slack in the web directly.

>So if the Electron bloat is such as issue for you, just hit Slack in the web directly. That's even more horrible, i've tried it. Chrome uses his own notifications on macOS instead of integrating with systems notification manager and always when one of these ugly, poor animated guys pops up, i can search through my 100 open browser tabs to find the damn chat. Millions of flamewars were fought about what's the best wi…

So just run it in a dedicated chrome window so you can alt+tab to it directly?

This was the main reason I used the electron version of slack and tbh it makes little difference if I run a dedicated Firefox window or the app since my laptop is less than a year old and could run a few hundred instances of either without sweating..

Re: Electron is flash for the desktop (2016)

#685

Is there a Servo + WASM based alternative to Electron yet? Would it be more effective?

I won't touch these kind of apps until Servo is here, with 60 FPS animations. If they can deliver that it will be a game changer.

I find disgusting that Electron (or even UWP apps) can't do that on PCs with high-end hardware. A simple laggy fade effect on a modal and my eyes start rolling to the back of my head.

Re: Electron is flash for the desktop (2016)

#686

Earlier quoted context omitted.

I guess I don't know what your point is then. Isn't your argument: "progress means taking advantage of hardware advances to use more productive tools?" I disagree with your assertion, because I don't think the only measure of progress is how productive programmers are (time-to-market, whatever). There are other measures: - user experience - program efficiency (battery life, fossil fuels burned) - program security - e…

No, my point is people will use anything that allow them to do what they want the easiest way possible, not matter the cost and cleaness. The point is the web is the most active platform. The point is doing things right is not winning. The reason you are missing the point is that you think it's only a technical problem. It is not. It's technical + cultural + societal + historical + economical. > It's hilariously easy…

Thanks for clarifying :) You're right, I missed the point.

> people will use anything that allow them to do what they want the easiest way possible, not matter the cost and cleaness.

I disagree, because people are implementing things in Rust right now even though it's harder than doing it in JS. Generally, they do that because they care about things like performance, safety, and maintainability. For them, "harder" is a broader term than just, "I wrote this quickly", because they factor in things like bugs and performance.

> The reason you are missing the point is that you think it's only a technical problem.

> It is not. It's technical + cultural + societal + historical + economical.

I do not believe these problems are only technical, which is actually why I feel so strongly about this topic in particular. There's a certain level of "I know this is bad, but [my boss told me to do it]/[I have a deadline]/[competitor X is right on our heels]" in tech right now. No other serious profession acts this way. Doctors don't say, "I know this surgery is wildly unsafe, but my chief told me to do it, so if people die oh well, it's not my fault". They have professional organizations and laws to back them up, and maybe more than that they have professional ethics and pride too. I'm not trying to say all doctors/lawyers/etc. are perfect, nor am I saying devs are bereft of ethics, but software engineers need to realize that our work is shaping society in a fundamental way. We need to start sticking to our ethics, our judgement, and our values when faced with economic or cultural pressure, because there are more important things than shipping and making money.

In particular, we need to start taking security seriously. Starting an app in C/C++ should mean 100% test coverage, thorough fuzzing, and pervasive use of tooling to avoid security issues, and honestly it's better to use a memory-safe language like Go/Swift/Rust/Java/C#/Kotlin whenever possible.

We need to take performance seriously. Our code takes electricity, and we mostly still get electricity from fossil fuels. I'm not trying to dip into moral hyperbole by arguing that the cursor in Atom is causing future famines, but we need to realize that performance isn't some nebulous concept. Slow code costs money and burns things in real life.

We need to take user experience seriously. PGP is the poster child for this, but this concept exists elsewhere too: the best security software is the security software you use (the best exercise is the exercise you do, etc.). It doesn't matter if you built the perfect programming language if it's too opaque, it doesn't matter if you built a decentralized Facebook if users don't use it.

We need to consider that not everyone has fast computers, fast phones, and fast, low latency, ubiquitous Internet access.

We need to say no to addictive features and dark patterns. A lot of the reason the web is a cesspool is that we've allowed companies to build products that are addictive, or that are very difficult to get out of. Good luck building an open Facebook; they have huge teams of people working on ways to keep people on their site forever.

We need to push back on closed-source. Tech has boomed in the last 10-20 years because of FOSS. Linux is the leading server and mobile platform. Security research is where it is because of FOSS projects like OpenBSD. Practically all of our development tools are free software. Our web servers, our browsers, our JS engines, our UI toolkits, that's right, it's all FOSS. If you want an example of what happens without FOSS, look at the state of messaging.

> You don't realize the ton of stuff you need to learn to do half of what you can do with HTML + CSS + JS with QT. It's huge.

Having done both, I do. I prefer Qt because I can use pretty much any language I want, Qt Creator is great, and I have better tooling in general. Web dev requires JavaScript and a bananas toolchain, neither of which I'm a fan of.

You act as though web dev is the easiest thing in the world, but just look around for JavaScript fatigue posts. All the toolchain stuff you have to set up, all the library/framework decisions you have to make, all the knowledge about the DOM, Babel, ES2017, CSS quirks, blah blah blah. It's "easy" (kind of) for web devs because they've been doing it for a while, but it's definitely not prima facie easy.

> they don't have the time to lear a hole new tech or API.

They absolutely do, and if their jobs don't give them time for professional development they should find ones that do. Lots of professions get this, nurses, teachers, attorneys, managers. This is in line with my "professional standards" rant above.

> - then you have to learn all the edge cases for packaging, distributing, updating and maintaining this software. On multiple OS.

> - then if you need a tutorial or a doc to help you, how does it compare to the web stack ?

> - then if you need to have new people added to the team ?

> - then if you need a custom widget ? reuse something that has been done ?

> - then the licence ? The versions conflicts ?

I guess just look at Qt projects like Telegram Desktop. Hey look they managed to distribute their code. Hey look custom widgets. Hey look, a lot of people worked on it. Or even stuff like GitHub Desktop written using WPF. Or major desktop apps like Photoshop, Nuendo, etc.

The Qt license comes up all the time, and it's seriously just don't link your app statically. Or advocate for your product to be open source. Or just Google LGPL.

> If we want native clean apps back in the game, we need to make it easy and convenient for the new generation of devs to provide the features the new generation of users want.

I view this from the "professional standards" perspective as well. I don't need to change my values and prioritize developer productivity above everything else, in fact I think that's disasterous. Instead, I think we need to advocate our values to "the new generation of devs": be willing to learn new things, take responsibility for the major role your work plays in society, realize none of this would be possible without FOSS, and consider that "better" doesn't just mean "I shipped faster".

> Otherwise, we have lost and we'll be dinosaurs, while people will just buy more powerful computers because "32gb of ram is not enough to display all those albums, you need to upgrade".

Hey, I like dinosaurs :)

Re: Electron is flash for the desktop (2016)

#687
post #666
post #216

Earlier quoted context omitted.

> Well, to the extent that these costs degrade the user experience, I'm not sure they really are externalizing them. Presumably they pay this cost in the form of decreased user satisfaction. It's just that this is a cost they are willing to pay. Precisely. I don't use Slack in part because its desktop application is irrationally bloated for its use-case. Although I have other reasons as well, they are enduring a cost…

Why they haven't made Slack a web based chat app like Discord or Wire or even Skype is beyond me. I don't even use their native apps, just open a tab in my browser and run the corresponding web app.

They already do, just not on mobile.

Re: Electron is flash for the desktop (2016)

#688
post #539

Earlier quoted context omitted.

Use Safari then.

Safari just doesn't work for me. It's my favorite browser ui wise, every time i'm getting a new machine i first stick with safari, but after a while under heavy use i notice all the problems with Safari getting slow, doing weird things, etc and i find myself on the Chrome download page again :(

While I was on mac i got an extra few hours of battery life from using safari.

I'm on Firefox these days; with noscript (once you go through the initial few days of pain whitelisting things) it works brilliantly; I would suggest you give it another chance..

Unless you try to book flights from britishairways though.

Re: Electron is flash for the desktop (2016)

#689
post #619

Earlier quoted context omitted.

> It's been a LOOOOOONG time since I worked on a laptop where I experienced noticeable performance problems... Really??? Because personally, I keep having performance problems on all laptops I have. Don't try running on battery saving mode, seriously. I stop counting the 5+ years old laptops that have to be upgraded, they can't watch a youtube full HD video in good conditions. ---- Fun Anecdote: I had to trial an ent…

> I stop counting the 5+ years old laptops that have to be upgraded, 5+ years ago is that LOOOOOONG time that OP was talking about. It's also unfair to compare technical capabilities of old hardware for many reasons. I think the point was that, new hardware, _while its new_, is becoming more and more capable. Any new laptop today, even budget ones, can handle YouTube videos in HD. The problem is that HD today won't b…

I meant 1080p when I said full HD.

It takes a surprising amount of power to decode. The cheap CPU from netbooks have been struggling for a decade, especially in battery power saving mode.

Lately, they get hardware acceleration just for that. Special CPU instructions and drivers just to achieve that decently.

Re: Electron is flash for the desktop (2016)

#690

Earlier quoted context omitted.

Yeah, but Python still doesn't seem to have a great cross-platform desktop GUI, as far as I can find. I'd prefer to code entirely in Python if I could, but I haven't liked a single GUI library I've tried for Python. Although to be fair I haven't really tried PyQT out still, but I don't like the idea of having to buy a commercial license for it.

PyQT is alright. Kivy as well. Or anything in any other language. But none of them are close enough to the benefit of being able to use the tone of experience from the Web UI into the desktop. Eventually all GUI app toolkit ends up with a custom MVC framework, a client/server architecture, some kind of db for persistence, their own implementation of asynchronous event and communication models and a declarative layer…

They should have adopted Qt; it makes it easy to write native C++ code that compiles on different platforms, so you get the performance and RAM usage of C++ but still most of the benefits that web coding offers, without so many drawbacks. (It's also quite nice to work with IMO.)

It's too bad it wasn't more universally adopted, by any of the 3 major platforms (including Linux, where the all-C Gtk+ has become the standard for the most part). Instead, it seems to have found its greatest success in, ironically, small embedded devices. Devices like this simply cannot take the performance hit of something like Electron.

Post reply on HN