>be dev >boss is kind of a cunt >look for new job >see one startup very close to home with better pay >5 years node.js experience... KEK >interview in two days >hasidic jew cto interviews me >tells me about how they're building a VoIP app completely in JavaScript using Electron >gives me weird coding challenges in their conference room with screen 25 feet away using an unregistered version of sublime text >blow through all of his challenges using closures >"WHY ARE YOU NOT USING PROMISES!?" >wtf? >shows me what a promise is in JS >"why don't you just use a normal language like Java for a desktop application instead of using this hacky shit?" >jew gets up and walks out >I take that as a cue to gtfo >hear him yelling at other jew in office about how they're fucked and they'll never meet their deadline
Sup Forums, why is everyone so JavaScript crazy? I think it's kind of a shit language... or am I just getting old?
You're kinda getting old. Programmer time is expensive, compute time is cheap, where it used to be the complete opposite. This leads to people writing things in shit like Electron which is stupid inefficient but relatively easy to write for.
Henry Ward
No you're right every UX prick wants to cobble some garbage together in whatever meme language they feel like using
Jace Campbell
They're jews.
Landon Scott
Yeah, but come on! There are a significant amount of abstractions here that I think it would run noticeably shitty in a real-world application.
Kevin Ortiz
You're getting old and JavaScript is just a shitty language.
Asher Campbell
Not on a modern PC. At the very least there are web browsers and serious text editors written in Electron that you probably know about.
Jaxson Miller
people using javascript think they can write anything and everything under the sun with it, including device drivers and programs that could borderline be considered firmware (like these fucks youtube.com/watch?v=gzG6RdN7iGY).
Writing anything other than web animations in javascript is doomed to fail in some way from the start. It's a fucking joke and I think the community does more harm to the community and to the world than any good.
I know some very, very good javascript developers (best friend for example) but they stick with web "applications" and websites.
Unfortunately, most get brainwashed into thinking they are special snowflakes because they've got a million frameworks and libraries. Which I would argue the opposite, how it shows how fucked up the community really is and how poor their programming skills must be to require libraries for fucking everything.
Nathaniel Myers
That story is fanfiction, but people like javascript because it's easy to meet their diversity quota since wymyn can learn JS easily since it's a pleb language desu.
Jose Cook
After taking a look at some apps written in Electron, I now understand why Atom is clunky, Ghost uses way too much cpu for a fucking blog, and discord takes way too long to load.... I guess they're pretty usable though. Just seems ridiculous and against good practice. It's like modifying a spoon to dig a trench.
Lincoln Howard
>That story is fanfiction no, I've seen similar things happen. I've had someone trying to defend shit like cordova to write mobile applications in because it uses javascript.
Hudson Rivera
the entire premise of the javascript camp is: Just add more computing power and the problem goes away.
Not: We write shitty fucking code on the most unoptimised language in the world on platforms we know nothing about.
Landon Torres
>ncluding device drivers and programs that could borderline be considered firmware you probably could using asmjs or whatever the fuck it's called
Jason Wood
This was actually a true story, unfortunately I'm still at my current job.
Juan Robinson
>you probably could using asmjs or whatever the fuck it's called but why? Why not just write it in C or Rust? Sure it has a greater barrier of entry and you need to know wtf you're doing. But that's for a reason and a good thing.
Plebs shouldn't write device drivers. Ever.
Connor Green
Agreed on principle. Kernel mode is not for frontend dev babbys.
Dominic Perry
If Github wanted to make a native desktop text editor, they would have to either hire native developers at full-retard SV salaries or shift developers away from other projects. Since their main focus is running a web service, the skill overlap is minimal, so they'd probably have to hire a bunch of new developers.
Instead, they built a "desktop framework" that's basically a webkit browser, and that means that anyone with JS knowledge can write extensions for Atom.
Alexander Smith
>all that work, just to be lazy why?
Matthew Williams
nowadays a certain breed of aspirational normy learns javascript but doesn't view it as babby's first code and graduate to an actual language, instead using it to worm their way into a development team using their superior normy social skills where they find they are out of their depth
James Jones
>be me >develop prototype with electron /c++ for native components >program is supposed to run in the background while emulating a different game >people complain about lag >optimize my application >application gets 50% slower >decide to just rewrite it in QT / C++ >port the whole gui in 2 days >port the rest of the code in 1 day >tfw almost no cpu usage idle
Jordan Russell
This is what I mean. Like maybe for an application marketing or sales related you wouldn't notice the difference but in a real-world or multimedia-heavy application you will see a major difference.
Connor Martinez
From Github's perspective, the benefits outweigh the costs dramatically. If you have far more web devs with experience to JS, putting in the initial legwork to make a framework for the JSbabbies to play on the desktop is worth it.
Plus the size of the web dev community is far larger than the community of devs that work in native apps. Github gets to let the community write extensions for Atom >for free Whereas if they made a native desktop app, they likely would have had to put in a lot more legwork writing native extensions for every language and use case to make Atom a useable dev environment.
Henry Reyes
well, they've ended up with a shit application. Written by normies, for normies, who never write anything of long term value anyway.
Nolan Perry
You could just use Vim. Hell, slap YouCompleteMe on there and it's basically a minimalist IDE.
Carson Powell
As soon as you update the dom really frequently, performance goes to shit. I was updating multiple elements 60 times a seconds, since my platform offers statistics of games in real time. There was also this weird bug where it just would randomly not work, or it wouldn't even start. (This could have been caused by my program looking like malware since it reds memory and sends it back to my server)
Jack Reed
I would not mind using HTML, CSS, and JS for the UI. But the main program should always be in a proper language if it's a desktop program.
Adrian Perez
Yeah, that makes sense, I can also imagine it being difficult taking advantage of the system's gpu as it's probably not possible to use OpenGL with JavaScript (without making somekind of native abstraction). Your program not starting could've probably been related to JavaScript's asynchronous nature.
Henry Torres
so why weren't you using promises?
Sebastian Roberts
He probably hasn't bothered to learn ES6.
Gavin Gonzalez
It's also a shittfest trying to communicate between the main program and the embedded web browser. The last straw for me was the fact that you can't profile it. The profiler is broken and doesn't even start. I could probably use a regular debugger but it probably wouldn't be very useful.
Ian Brown
did you ask him if this was a ruse?
Joshua Baker
>tells me about how they're building a VoIP app completely in JavaScript using Electron Dear God...
>hear him yelling at other jew in office about how they're fucked and they'll never meet their deadline Who the fuck thought that was a good idea any way?
>muh productivity! Language is dead last as a factor. And 'productive' languages are boat anchors when they lack a critical feature, require jumping through hoops for some things, or require countless hours of optimization to run acceptably.
Here are the productivity factors in order of importance: 1) Developer skill. 2) Developer familiarity with the problem. 3) Language or library features which make it easier to model and solve the problem. 4) The language itself.
Note that it's entirely possible for C to better model a problem than Java, JavaScript, Python, or whatever else is out there. The "muh C buffer overrun!" crowd doesn't get that. They can't fathom that sometimes having direct control over memory makes it easier to model a solution.
This industry is filled with too many graduates of degree mills and coder camps who really only know one language and meme it no matter what.
Carson Jones
This.
Definitely this.
Brayden Rivera
>>tells me about how they're building a VoIP app completely in JavaScript using Electron
This is when I walk out. Fucking retards trying to use Javascript anywhere but in the browser.
Node is fucking cancer.
Luke Moore
>tells me about how they're building a VoIP app completely in JavaScript using Electron That's actually not a terrible idea. All you really need for VoIP is to send audio through websockets. If you can get a native encoder/decoder to hook into Electron (assuming it's able to do that) you basically get 99% of the performance of a C app
Aiden Sullivan
is that the KDE mascot as an airplane?
Ayden Rivera
Discord does it just fine :^)
Jace King
>video These people. I wish they'd stop breathing so much. They just keep on living throughout the whole thing and I hate it. They actually said that it's normally fine for node servers to go down. Because they restart themselves.
Justin Foster
no, your mom as your father
Mason Reyes
Can someone redpill me on Javascript and electron Exactly why is it so bad?
Brayden Williams
>redpill
Off to Sup Forums you go..
Evan Kelly
JavaScript isn't that bad. Most of its poor design features are fixed in ES2017. Even node.js is fine. node.js and libuv are decent projects that generally make sound technical decisions.
It's the node.js community that is bad. They're all attention-deficit teenagers who build massive towers of complexity out of interdependent frameworks, then drop them all a couple of months later because they saw a tweet that said something else is cooler. You have to keep up with all the trends in the node.js community or you will be ridiculed, even if the trends are obvious bad practice, like adding hundreds of micro-dependencies for basic functionality (see the left-pad saga.)
OP had the same problem. Originally, it was considered totally fine to use callbacks for asynchronicity, then Promises came along, except you couldn't just use them because they weren't part of the language yet. You had to pick a promise library (yet another dependency,) and you had to pick the cool one so your fellow node.js developers would know you were cool (but was bluebird or q the cool one?) Now Promises are part of the language, so you have to use them for everything, even when they don't fit. When Node 8 comes out, async/await will be the cool thing and raw Promises will be considered old hat.
Electron is also retarded because these idiots, who used to only make web applications, have now decided that all their web "skills" transfer to the desktop. Hence Electron is just a borderless web-browser that runs a built-in node.js web app, which means Electron apps are just as slow and resource-intensive as web apps, and they all come bundled with their own 50MB browser "runtime." Despite everything, this is considered good practice by node.js children because "the web is universal," even though web languages like CSS and HTML are ill-suited for the desktop. Of course, technologies that were actually designed for the desktop (like Qt ) are easier to use and work a lot better.
Daniel Harris
>A Promise represents a value which may be available now, or in the future, or never.
what
Lucas Morris
>why don't you just use a normal language like Java Stopped reading right there. Java desktop applications are just as cancer as Electron ones.
Ryder Howard
>Not knowing what a Promise is Promises have been around before Javascript, broheim.
>>muh productivity! >Language is dead last as a factor.
When you have to target Windows, OS X and Linux, like most of these electron apps propose to do - then it does matter. Most of the non pants-on-head retarded uses of Electron are used so they can get cross platform dev for free without having to deal with Java's dumb-as-shit GUI libraries.
Zachary Walker
>Most of the non pants-on-head retarded uses of Electron are used so they can get cross platform dev for free without having to deal with Java's dumb-as-shit GUI libraries. If only there were some other cross-platform GUI libraries.
Joseph Wilson
loooool
Joseph Howard
Quality post, thanks.
Brandon Edwards
That's such a dumb argument! I'll tell you why after our Electron app finishes compiling from JS to JS
Isaac Allen
Go write a decent cross-platform text editor, I'll wait. Cross-platform GUI toolkits help you make basic bullshit windows with a few input fields, buttons and checkboxes, they all fail you if you want to implement anything advanced. Then you have two choices, either paint the whole UI yourself like Sublime does or use a web browser because they're already doing 99% of what you want under the hood for you.
The fact that even Microsoft went with Electron should tell you mongs that there is no other way around this. People bitching about this are clueless idiots.
Henry Hughes
One major benefit for Electron is basically 1 code runs on all 3 platforms, and all the buttons, menus, notifications, etc., look natively. This is a major plus, at least for some of my personal apps. But there are good use cases like Visual Studio Code out there.
Noah Morgan
>Desktop >Java The hell is wrong with you?
Nathaniel Anderson
>just use C The answer is unironically "aint nobody got time for that". People want to use JS for good reason.
Jason Gray
You don't write asm.js manually, you write in c or c++ and compile to asm.js
Also, why aren't they using Erlang for anything that has to deal with communication?
Mason Morales
He is right you know
Nicholas Hernandez
This.
Lucas Richardson
Java has the same slogan yet that is shit on everywhere too.
Kayden Scott
>Visual Studio Code literally everything that's wrong with electron applications 13% cpu time for a blinking cursor
Caleb Brooks
>and all the buttons, menus, notifications, etc., look natively But they don't. Nothing in the content area looks native. Even if you don't use CSS, all of Blink/Electron's form widgets are custom. Even menus look different in Electron, at least on Windows and on Linux without global menu bars. It makes no attempt to match the system theme.
>But there are good use cases like Visual Studio Code out there. Of course, the Sublime Text clone that is significantly slower than Sublime Text for no good reason.
Lucas Allen
IntelliJ IDEA is a desktop application and it looks and performs really well
Isaiah Butler
I'm in this exact situation. Switched careers and learned Javascript because the only barrier to entry is not being retarded.
Now I wanna reduce my dependence on Javascript and learn proper software development tools and I'm quickly realizing just how much I don't know.
Aiden Long
/r/thathappened
Landon Diaz
>13% cpu time for a blinking cursor stop with this meme, it was an implementation bug on macOS
Bentley Parker
>writing native extensions for every language and use case nah, you'd just embed python or something for that
or you come up with a dll/shared lib plugin system and embed a couple script languages that way (python, lua, ruby...)
Joseph Mitchell
sounds about right desu
electron is cancer but a nice idea if you just wanna hack up a prototype as fast as possible to see if your idea will even go anywhere
then if you don't want to write a ton of c++ ui stuff there's always that qml shit too where you can mix js and c++ for handling ui events and everything (but it's not web so no dom any of that shit)
Daniel Robinson
Saving this. Thanks.
Dylan Sanders
>tells me about how they're building a VoIP app completely in JavaScript using Electron >Dear God... someone discovered all those fucking webrtc libraries/frameworks and got a bit too ambitious with them, kek
Henry Young
copy pasting some user's rant a few days ago that's fairly accurate;
>be poorfag BA or art student >want to be creative and follow 'passions' >but don't want to be a poorfag >don't like math >thinking makes brain hurt >problem.jpeg >learn about baby's first programming language: javascript >no need to think about types >no need to think about data structures >no need to build and compile >no need to debug 100+ errors before first run >syntax fairly close to english >itjustwerks.mkv >it's the language of the web for crazy looking websites >thanks netscape >give 0 shits that HTML/CSS was a mistake that top minds are trying to fix about the internet >give 0 shits about runtime >itjustwerks.pinterest >multiply by 1,000,000 >there's more artfags than script-fags >by pure power of numbers strong arm industry to using JS >industry starts using JS since more people know it than special snowflakes like Haskell >HTML/CSS/JS now tied strongly to the web >by pure power of numbers web industry now uses JS >still be a lazy ass artfag who gives 0 shits about the industry >would be nice if I can just copy someone elses JS code >start sharing code bases >give 0 shits libraries used to be designed by PhDs or experts in algorithms >give 0 shits libraries take a lot of work and research to develop >make some inefficient code, push it to npm >other JS coders also give 0 shits about efficiency >they start using inefficient modules in npm >by pure power of numbers, JS churns out more modules and libraries by the minute other than more efficient languages >everyone is now using everyone's inefficient code bases for faster coding >JS is now so big and cluttered industry needs more JS people to fix JS people's shit >now too many people in front-end space >backend developers and desktop app developers are in demand >would be great if we can use JS on these spaces >node.js and electron were designed >thanks google >HTML/CSS can no longer be fixed