Me, 3 hours ago. https://news.ycombinator.com/item?id=31351147
Me, 3 hours ago. https://news.ycombinator.com/item?id=31351147
I think some people are "maximizers" - They will always do research to seek out the "best" for their given budget for even moderately priced purchases. Engineers tend to fit this profile, so its easy for them to get psyched-out when trying to ship a product.
But people - and businesses - aren't always like this. They will buy what's available and seems to get the job done and seems like less of a hassle.
I worked at a company that at one point had an inferior product to our biggest competitor. We survived and they went out of business. Looking back, one big reason was the fact that we were able to fly under their radar until we had feature parity. We had no fear of shipping early... or shipping half-baked features. I kind of cringe now looking back. And when we finally eclipsed them (as those half-baked features slowly became fully-baked) we were still invisible to them - it wasn't until we started poaching some large accounts of theirs that we finally landed on their radar.
Also, V8 is an incredible piece of technology, and is not that far off being competitive with Rust or C++. In some scenarios GC (by which I mean tracing) can outperform reference counting, or even Rust-style malloc+free. The event loop architecture is also very naturally fitted to user interfaces.
Ignore the HN opinionmongers and build with whatever tools you can work with. You'll be much faster and more flexible, and you'll gain an understanding of what the bottlenecks are, which you can use to do targeted optimisation later on :)
Purely from the user perspective I hate electron, because of its RAM usage. The speed argument is a straw man: Of course V8 is fast. And yes, VSCode is a very good IDE. But the problem is real world electron application don't scale down. In my (of course biased) experience even simple electron applications use at least half a gigabyte of RAM, often a whole gigabyte. If you're on a beefy 32gb machine you'll never noticed the difference. But on the 8gb machines most people around me use, these electron apps really take up a huge fraction of RAM. And swapping is definitely noticeable slow, even on SSDs. The "think about the planet" argument comes to play, when I need to upgrade my PC because RAM is the bottleneck. And seriously what fraction of the population even has the knowledge to only upgrade the RAM and not buy a whole new PC.
If I had to advise you personally, I might even tell you to choose electron. But be aware that you are using the "defect" option in the prisoner's dilemma: as everybody around you is choosing the societally harmful option of wasting resources you are at a competitive disadvantage to do the right thing. And also: electron has stolen mind share off of better solutions, so the documentation there is also not in the best place.
And even worse, those people I reach with my argument, and thus put at a competitive disadvantage because they are going the extra mile to do the rights thing, might be those that I want to support the most, because they might be willing to the right (IMO) things at other topics I value as well, like the importance of privacy.
So what is the conclusion? I have no idea how to fix our collective resource waste and it is hard to assign individual responsibility and I'm deeply dissatisfied by the whole situation.
I suspect the difference is because they are responding from a developer's mindset, not a user's. For devs, Electron really is the easiest way to make desktop apps, especially if one already has web experience. Users who dislike Electron are generally seen as a vocal minority (how many people use Slack or VSCode vs non-Electron variants?). But then you have this vocal minority congregating on HN, which is especially focused on speed, and you get comments like the parent linked, dismissing Electron.
The dev point of view is more prevalent in this thread because the linked article is all about how a dev failed to ship an app because they thought it wasn't good enough, which is exactly the problem Electron solves, even if it's worse for the user.
For developers who have never heard of Visual Basic, Delphi, or Free Pascal / Lazarus, Electron really is the easiest way to make desktop apps they know of.
There, FTFY.
To think that devs these days should use any of them is to be tone deaf to how the tech world works these days. Good luck convincing a dev, much less their boss, to use Delphi to develop their cutting edge desktop apps.
Libraries and support for what? Betcha 99 percent are for stuff that 99 percent of developers don't need.
> Good luck convincing a dev, much less their boss, to use Delphi to develop their cutting edge desktop apps.
Wasn't this a discussion about the single bloke working on his Minimum Maybe Viable Product? He's his own boss. And if he doesn't want to be convinced to use the best tools for that -- his problem, not mine. I was just correcting your factual error about the easiest way to make desktop apps.
I think the most likely conclusion is that once OSes are guaranteed to have a modern-enough browser engine (this is close to being true for Windows since they introduced WebView2), Electron could update their framework to use the system's native webview (or at least make it available as an option for the developer). This would bring back the problem of having to test in multiple browsers, but I'd rather test against an old version of Chromium, or even Safari, than have to test against the old Edge engine in WebView1.
Edit: Did some more reading, and the way Electron discusses WebView2 doesn't seem to imply that they're interested in integrating with it: https://www.electronjs.org/blog/webview2
But regardless, I think all it would take is someone else making a framework that uses native webviews and implements enough of Electron's APIs/tooling to be close to a drop-in replacement. (Then again, how many people are using Preact?)
Plus, there are tons of slow buggy apps that are written in c++, that doesn't guarantee performant software. Electron doesn't need to be slow either, VSCode demonstrates that. Especially for a solo dev or small team, electron is for sure the right choice for a desktop app.
Edit: the reason I tend to dislike electron is that apps don't often follow native UI trends, which is definitely a solvable problem.
Electron works great for some of those use cases.
The other stuff works great for other use cases.
Anyone giving general advice on that is giving bad advice, period.
I switched to using Tauri recently though, with the same sort of architecture - Svelte front end, Rust for the heavy stuff, and it’s working out nicely. It’s actually faster than the Mac app in most ways (and to be fair, Electron worked well too, but the installer size and startup time bugged me)
If you don’t like the bloat of Electron and don’t mind dealing with 2 browser engines instead of 1 (Webview2 + Safari), Tauri is worth a look. Doubly so if you already know some Rust. They’re still a bit early days in some respects, so it depends on what Electron features you need.
The only useful recommendation here is that, when you have some time, and don't have to rewrite an entire app, and if you expect to target the desktop again, you will gain from learning desktop frameworks. But absolutely not now while you are on the middle of something.
If you're starting to sell a product, it's really valuable to spend some time thinking about areas in which you behave as a satisficer, a person who's just looking for "good enough". Maybe it's buying rice. Or apples. Or where you fill up your car. Or buying jeans or flatware or toilet paper. There will be some things where your goal is to devote as little time and attention to possible to make the choice. Where you just want it to work adequately for your purpose.
The truth is most people are in satisficer mode for most purchases, if only because we don't have the time to really dig in on everything. Thinking about one's product from a satisficer perspective can be really helpful, as they tend to value things differently. They can also be much easier to sell to and are more likely to stay loyal as long as things are going smoothly.
Enter AWS and GCP. People wonder why businesses seem to burn 10s of millions of dollars by choosing AWS instead of self-hosting, but the personnel and time advantage of offloading to AWS is often worth it.
I think it is something that is easy to describe in theory, "ship what people want", "pivot quickly" etc. but the truth is most of us think we have solved a problem with our product but as soon as the first customer says, "I would buy it if you changed all those things", we quickly get stuck between, "product market fit" and "I am not solving your problem so let's find the customer whose problem I am solving" to avoid creating something that only customer wants.
My point isn't really about the customer - it's about the startup, and the belief that you'll get to where you want to be eventually. Every single reason a founder can come up with not to be out there selling like "The product isn't finished", "It needs feature X", "It's not fast enough", "It needs better design", etc is wrong. No matter how bad your product is, if it's enough to solve the problem a bit then someone will pay for it. Any improvements you can make after that just increases the number of people who'll buy.
The fun game of running a startup is to make sure you're finding enough customers to make enough money to pay for building new things that enables you to find more customers, until you're big enough to either be self-sustaining or exit.
But don't you run the risk of some potential customer coming, trying it, deciding it's crap, moving on, and now they are burned for the foreseeable future? So, once your product isn't that crap anymore, they won't come back try again, since your brand is burned and has built a "that's crap" reputation?
Startups are about the customer. Every single thing we do, whether related to tech or not, is to find and satisfy a customer's need in order to make it worth their while to give us money for our product. I think we agree on that, but if you ever disconnect your perspective or decisions from the customer, you open yourself up to going off-track.
I think OP's point is that the customer is a better judge of "worth" in the sense of money spent vs pain reduced than you are.
It's impossible to do that worth test yourself. Expose to what you make to customers; see if they vote with their dollars.
The ones where I just went and built something and started selling the MVP are making a couple $100/mon.
This thing you are building will prove everyone how smart or [SOMETHING ELSE] you are and the only way to have this happen is to strike at once, shock and awe everyone with your brilliance. You can't simply launch an imperfect product, what that will say about you?