this post was submitted on 11 Sep 2023
718 points (100.0% liked)

Programmer Humor

854 readers
1 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] guywithoutaname@geddit.social 84 points 1 year ago (3 children)

I love having multiple copies of Chromium installed on my system at the same time. 250 MB internet messengers please!

[–] masterspace@lemmy.ca 24 points 1 year ago (3 children)

You ever notice how everything installs and uninstalls super cleanly and easily these days and software gets consistent regular updates?

That's because developers stopped min/maxing storage and started bundling all of an application's dependencies with it instead of trying to rely on globally installed packages and frameworks that can break or be missing or lead to dependency hell.

No one likes larger download sizes and more storage being used but the tradeoff is by and large worth it.

[–] otter@lemmy.ca 23 points 1 year ago (1 children)

Isn't this about performance and not storage?

Making and managing an electron app is easier, but it is possible (with more work) to have clean install/uninstall, a nice UI, and consistent regular updates while still being fast and efficient.

Better programs will always need more work to create.

I am curious about what other options there are, and why Electron is what a lot of people go with.

[–] masterspace@lemmy.ca 14 points 1 year ago* (last edited 1 year ago) (2 children)

Options:

Native app for each platform:

  • Pros: native code is going to be the fastest possible to run and have the smallest dependencies
  • Cons: have to write all your code 3+ times in different languages, have less time to develop new features and optimize existing code.

Progressive Web App:

  • Pros: single app, write once runs anywhere, no signing keys, no lock in, can be hosted anywhere, runs on everything
  • Cons: artificially limited by Apple on iOS, doesn't have access to deep operating system resources, only what's exposed through the browser, limited multithreading capabilities

React Native:

  • Pros: single app, write once, runs anywhere, similar enough to React Web that a lot of developers will have an easy time learning it
  • Cons: still kinda finnicky, not super easy to make it work and perform well across all platforms, you'll probably still end up having to write some native code, not actually CSS / React Web so still a bit of a learning curve coming from there

Qt:

  • Pros: single app, write once, runs anywhere, low level / compiled means that it will be small and performant
  • Cons: written in C++, harder to find developers for, harder to implement modern out of the box niceties that CSS gives you for free, poor devX compared to react

.NET MAUI (formerly Xamarin):

  • Pros: single app, write once, runs anywhere, low level / compiled enough to be more performant than most web apps out of the box, well documented
  • Cons: written in C#, easier to find devs for but not many experts in it specifically, MVVM model is not as pleasant of a devX as React, again no css

Electron:

  • Pros: single app, write once, runs anywhere, has full access to operating system resources and deep multithreading if needed, can be as simple as web app in a container or as complex as something like VSCode.
  • Cons: takes up more storage and ram since you're bundling chromium with your app
[–] aksdb@feddit.de 5 points 1 year ago

Flutter is quite nice too. Closer to web dev, but still pretty close to native.

load more comments (1 replies)
[–] RaivoKulli@sopuli.xyz 10 points 1 year ago

You ever notice how everything installs and uninstalls super cleanly and easily these days and software gets consistent regular updates?

Not really. Well maybe I take it for granted having switched to Linux.

I mostly hate Electron for the dumb RAM usage.

load more comments (1 replies)
load more comments (1 replies)
[–] beyond@linkage.ds8.zone 52 points 1 year ago (1 children)

We live in a timeline where desktop apps all run in a browser, whereas mobile websites are all their own apps.

[–] flashgnash@lemm.ee 8 points 1 year ago* (last edited 1 year ago) (1 children)

For now at least, PWAs work on Android and I believe many apps already use electron or something similar under the hood

load more comments (1 replies)
[–] smileyhead@discuss.tchncs.de 36 points 1 year ago (13 children)

World Wide Web was not intended to be an app framework.

[–] Blackmist@feddit.uk 7 points 1 year ago (2 children)

What else works across as many platforms and screen sizes as well as the combination of HTML/CSS/JS?

Most attempts to build that just lead to a worse version of it.

I'll be the first to admit it's bloated to all hell after 25 years of people stacking crap on top of more crap, and it's perilously close to being completely controlled by Google, but it is what it is.

[–] ICastFist@programming.dev 18 points 1 year ago (3 children)

What else works across as many platforms and screen sizes as well as the combination of HTML/CSS/JS?

Doom. It runs on every-fucking-thing

load more comments (3 replies)
[–] smileyhead@discuss.tchncs.de 10 points 1 year ago* (last edited 1 year ago) (1 children)

Maybe I do not specify clearly what I mean.

Why to order taxi, access bank, register a domain name do we have to have apps on all platforms and then to fix this problem we bloat the web by creating webapps. Why not just plain simple HTML website beautified with CSS instead?

Real cross-platform apps are those written in, for example QT. Then came Android and iOS forcing everyone to use their toolkits so we started to abuse poor web.

[–] Blackmist@feddit.uk 5 points 1 year ago (1 children)

Well I'm in agreement there.

The only reason they want everything as an app is so they can push notifications and do any tracking they can legally get away with (and some they can't but who's gonna know?)

Dominos have locked all their deals that actually make a pizza a normal price that humans would willingly pay for a pizza behind their app. There's no reason for them to do this. Surely their business model is selling pizza? So now I go to a little family run pizza shop, pay less and get decent pizza.

[–] Dubious_Fart@lemmy.ml 3 points 1 year ago

Yep.

Your standard web browser has to many privacy protections for you and your data.

Its why they want to push you to an app, that asks for WAY to many permissions to do what it needs to do. Cause it doesnt need that access to function. It needs that access to monitize you. Cause they make more off stealing your information, than they do off you being a customer, Which is why you get so many discounts for using apps.

load more comments (12 replies)
[–] theamigan@lemmy.dynatron.me 34 points 1 year ago

It seems every new shiny technology today tries its darndest to short-circuit 40+ years of advances in OS virtual memory design. Between Electron and Docker, the entire idea of loading an image into memory once and sharing its pages among hundreds of processes is basically dead. But at least there's lower support burden!!!1111

[–] masterspace@lemmy.ca 20 points 1 year ago (2 children)

Electron is awesome, badly coded apps just suck. Look at Voyager for Lemmy, it's great and it's just a web app.

[–] xusontha@ls.buckodr.ink 20 points 1 year ago

Electron apps are nice in some ways, but use a ton of memory

I usually don't mind electron apps too much, but I do prefer native apps

[–] smileyhead@discuss.tchncs.de 13 points 1 year ago (1 children)

No, it's not nice. Looks good only on Windows where everything have unmaching look anyway.

[–] masterspace@lemmy.ca 7 points 1 year ago* (last edited 1 year ago)

Lmao, need more title bars to match macOS' 90s aesthetic?

[–] crow 19 points 1 year ago

If I have to load elements from the web just to use the electron app properly, I’d rather use a web app and load the whole page each time and not have the tracking.

[–] lowleveldata@programming.dev 12 points 1 year ago (3 children)

That's why I got 32GB ram when I upgrade my PC. I don't give a fuck to how many ram they use now.

[–] xavier666@lemm.ee 15 points 1 year ago (3 children)

This is the same coping mechanism as "just build another 4 lane highway. That should solve the traffic issues". You are just shifting the problem.

load more comments (3 replies)
load more comments (2 replies)
[–] xilliah 12 points 1 year ago (1 children)

Tja in a world where every OS has its own stupid little UI system, language and IDE..

[–] xusontha@ls.buckodr.ink 4 points 1 year ago (5 children)
[–] PureTryOut@lemmy.kde.social 8 points 1 year ago* (last edited 1 year ago) (3 children)

Dutch people use it (although I doubt it's an official word), meaning something like "that's what you get" or "oh well".

[–] xuniL@lemmy.dbzer0.com 6 points 1 year ago

Also used in German

[–] xusontha@ls.buckodr.ink 4 points 1 year ago

OK that makes sense, though I wonder why they mixed Danish and English; maybe that's common and I've just never seen it before

load more comments (1 replies)
load more comments (4 replies)
[–] el_abuelo@lemmy.ml 11 points 1 year ago (4 children)

Folks in this thread complaining about Electron I think miss the point. It is a trade-off. It is designed to allow engineers who have a web dev skillset to write desktop apps. For those like me who want to write the occasional hobby app - it's great. It's also great for orgs to be able to have cross functional teams. Just like React Native allows this for the mobile world. This could be because they're small and can't afford specialist native engineers for each platform they want to support - or it could be that they want to spend their money in other areas and happy to trade off app performance. If it was as lean or as performant as native apps there would be a lot of people in this thread looking for work.

[–] ICastFist@programming.dev 8 points 1 year ago

Electron is just the "easiest, most common option", because things like TauriJS and NeutralinoJS exist, which do what electron does without having to bundle a whole-ass Chrome browser.

[–] xusontha@ls.buckodr.ink 3 points 1 year ago (1 children)

It's not terrible, electron is good for stuff like what you discuss

I just like native apps better haha

[–] el_abuelo@lemmy.ml 3 points 1 year ago

Native apps have the potential to be better than electron apps for sure. I get that.

This is a surface level thing though - the question is: would THIS app, written by THAT organisation be better if it was native? Unlikely because they don't have the skillset for it...otherwise it would have been a native app. Its also likely that less apps would even exist because the barrier to entry is higher without electron and similar.

But this is just a meme and I'm taking this way too seriously!

load more comments (2 replies)
[–] lord_ryvan@ttrpg.network 11 points 1 year ago

And no, my fellow PHP devs, “Native” PHP's also not it!

[–] Andrew15_5@mander.xyz 8 points 1 year ago (2 children)

Wait until Tauri will gain popularity.

[–] Cornelius@lemmy.ml 10 points 1 year ago (1 children)

Yeah, then we can have marginally more responsive web apps.

Seriously though, web apps are usually just optimized like shit in addition to using chrome.

[–] Andrew15_5@mander.xyz 3 points 1 year ago

Do you know what this even is? It's not marginal at all. Check the comparisons of Tauri and Electron. And it does not use Chrome. Electron also doesn't use Chrome.

load more comments (1 replies)
[–] h_a_r_u_k_i@programming.dev 6 points 1 year ago* (last edited 1 year ago)

Well, people tend to pick the easiest way to achieve an objective, even though the solution is not simple nor optimised.

[–] 30p87@feddit.de 6 points 1 year ago (3 children)

That's why I use discord in a separate FF instance and spotify-tui with spotifyd

[–] fred@lemmy.ml 6 points 1 year ago (1 children)

Audio chat is "not supported" by discord in Firefox last I checked. Are you spoofing user agent also?

[–] RarePossum@programming.dev 4 points 1 year ago (1 children)

It works for me.

I did originally have some issues and did some searching that there used to be firefox issues that are now resolved. Mine were fixed by restarting my VPN, but otherwise no problems.

load more comments (1 replies)
[–] JSens1998@lemmy.ml 3 points 1 year ago (2 children)

Damn, I didn't even think about running Discord in a separate FF instance like that. Been looking for a more privacy focused approach then installing from the .deb. Thanks man!

load more comments (2 replies)
load more comments (1 replies)
[–] shiveyarbles 5 points 1 year ago

We use flutter and the app on iOS and Android look great. The web version looks and works like shit though

load more comments
view more: next ›