8 ms·
I honestly don't agree with this. The worst programs are written by people who know how to plug a million and one things together, but can't drill down and anal
by bananaface 6y ago
I honestly don't agree with this. The worst programs are written by people who know how to plug a million and one things together, but can't drill down and analyse the algorithmic implications of what they're doing. Electron runs like shit and inhales RAM is because it was programmed by people who don't have solid understanding of fundamentals. They understand a huge number of horizontal abstractions but they have no concept of how it looks vertically.
Knowing how to maximally exploit a CPU is way more important than knowing eight different Javascript frameworks if good software is your objective. And frankly, learning Node is way easier than figuring out how to structure basic, bare-bones Javascript so that it leverages your L1 cache.
And therein lies the problem. How many interviewers dock marks for iterating over columns, instead of rows? Because that matters, a huge amount. How many interviewers would give credit for "how can you speed this up?" if the interviewee said, "write it in C, and simplify the datastructures you want me to use so we maximise sequential lookups over basic arrays, to maximise cache usage." They'll look at you like you have three heads.
"Don't you know Big N complexity is the only thing that really matters if you're looking for speed?" - then you get Electron.
- tikwidd 6y agoPerformance matters when it matters. Part of the job is knowing when it matters and adjusting the approach accordingly.
- bananaface 6y agoEfficiency automatically matters for something like Electron because if it's not well-engineered, it will produce monstrosities like Slack. If Slack was written in Qt with the same budget it would just be fast. Even with effort we don't have Qt apps that behave like Slack.
- aprdm 6y agoIf slack were built in Qt it wouldn’t ever have hit the market or adapt to changes. It would be an order of magnitude more expensive too. Do you feel that you somehow know something that nobody else knows ? It’s all about trade offs . Being able to move quicker seems more important to businesses than writing more performant software .
- bananaface 6y agoIt's a chat client, it's really not complicated. Even if we take for granted that they genuinely had to ride on top of Electron to get to market (I think the back-end is probably much more complex), they have more than enough money at this point to rewrite from scratch. Note that one person is literally doing that, with ripcord. Looks like shit but it illustrates the point.
- aprdm 6y agoIt is really that complicated. They have a lot of features, integrations and platforms. I don't believe you understand how a chat client code base could be much more complex than Unreal.
- bananaface 6y agoEvery multiplayer game on the market does 90% of what Slack does as a side note.
- aprdm 6y agoCan you give me one that integrates to all my business ? Monitoring , metrics , deployment , etc. I am also looking to play said game on all platforms ! iPad , Android , iPhone , Mac , Linux , Windows and etc. Would be great if the chat client supported markdown as well
- bananaface 6y agoI understand the point you're trying to make but arguing that World of Warcraft is less complex than the Slack client is not the hill to die on.
- aprdm 6y agoFrom your posts your view of complexity seems very limited to the art of programming and making complex, fast and correct programs. Complexity for me is the software engineering part which the Software Engineering at Google displays really well and I agree wholehearted. I would argue a game is simpler because it doesn't need frequent updates and doesn't live forever. I work in systems at my company used in a very big scale that were written 30 years ago and are still maintained / changed. That system I would argue is much more complex than any game. Even tho from your point of view it probably only updates files on disk :)
- swyx 6y agojust here to say that vscode works plenty fine on electron and has handily beat out other IDE's you might consider better software. it's always possible to use a tool badly but it's not always the fault of the tool.
- bananaface 6y agoAs someone who uses Emacs (which is a terrible piece of software in its own right), looking at the top feature requests for VS Code is like looking into the twilight zone. It lacks absurdly basic functionality. Granted, they made Electron run fast enough to be usable but I wouldn't call it good software.
- fr2null 6y agoIt might lack functionality that you use on a daily basis, but I don't think it lacks any objectively basic functionality. In my opinion this is proven by the fact that thousands (millions?) of programmers, including me, work with VS Code on a daily basis.
- bananaface 6y agoWhat's the alternative? All editors are kind of crap. Compare them to raw level of engineering you find in, say, a video game. It's a different world. Imagine VS Code was exactly how it is now, but had the extensibility of Emacs. It would blow everything else out of the water. Why isn't it like that?
- ativzzz 6y ago> Why isn't it like that? Because most of us don't care. I need my code editor to just work out of the box. I want to be able to write code and install a few plugins to enhance the tools I'm using. Hacking my editor is a waste of my time and even if I wanted to, I'm certainly not going to learn lisp to do it.
- furbyhater 6y ago
- Aeolun 6y ago> Knowing how to maximally exploit a CPU is way more important than knowing eight different Javascript frameworks if good software is your objective Which is why 90% of all software is very profitable crap.
- h0l0cube 6y ago> Electron runs like shit Does it? I've seen some electron apps that run like dogs, and others that seem perfectly performant. So, I'm curious... in what way does the framework run like shit? In what way could it be improved? > How many interviewers dock marks for iterating over columns, instead of rows? Because that matters, a huge amount. I think you mean the difference between SoA and AoS. I'm not sure that one is inherently better than the other, except the former scales well for large homogenous datasets. I doubt optimising for DSPs/SIMD/big-data to maximize throughput and reduce cache-misses, is something the typical FAANG employee needs to know about. Could be wrong. > "Don't you know Big N complexity is the only thing that really matters if you're looking for speed?" It does, even if you cache-align and pool your data. And you can optimise your in-memory data-structures (and database IO) later, if profiling finds them to be a bottleneck.
- bananaface 6y ago>I've seen some electron apps that run like dogs And almost no Qt apps run like that. "As long as I don't notice it most of the time, it's not slow." No, sorry, I don't agree. Frameworks should be fast. Slack is unforgivably slow. >I think you mean the difference between SoA and AoS. I mean literally in the interview when they do a nested for loop over primitives. Do they lose marks for going row-first? Why isn't that considered a basic rule? It's not complicated. Most interviewers don't even realise there's a difference (!!). >I doubt optimising for DSPs/SIMD/big-data to maximize throughput and reduce cache-misses, is something the typical FAANG employee needs to know about. Twitter is so bad it crashes my browser. It's 90% text! The only ram-hogs are auto-playing videos that dissapear after you scroll past them. These engineers are paid half a million per year. Half the time the website doesn't even load (!!!). That's insane. >And you can optimise your in-memory data-structures (and database IO) later Ehh, skeptical. Unless your data & algorithms are structured as contiguous arrays of primitives to begin with you're going to have trouble refactoring the abstraction.
- aprdm 6y agoFWIW I work in a place which uses a lot of C++ and cares a lot about performance. I have seen a lot of really bad Qt UIs as far as responsiviness. The Signal/SLot framework can get really hard to follow in huge code bases with lots of state. The whole thread interaction in Qt is not ideal. It is interesting because most of people are now actually using PyQT or pyside. Even with these being slower than pure Qt. Because it is easier to adjust to business requirements with Python. Oh, and I have personally rewritten some of these UIs in React and replaced them with a web browser which made them much more responsive.
- conradev 6y ago> Electron runs like shit and inhales RAM is because it was programmed by people who don't have solid understanding of fundamentals. I feel like this is a huge oversimplification. I’d argue that for sufficiently large projects (say, Chromium) every single programmer who works on it could have a strong understanding of performance fundamentals but the product itself could still have performance problems because there are necessary levels of abstraction involved and no one person has the entire codebase in their head. Performance problems could come from emergent behavior that could not have been predicted by the original engineers. But, as for implementing an app on top of Electron. Say I need to write a cross-platform app with a consistent style and fluid animations. I know how to write a NEON implementation for ChaCha20 for fun, or write a zero-copy binary property list parser that’s faster than anything I’ve found. I have a decent understanding of performance. That doesn’t help me write this cross-platform app. I don’t have to time to write a novel native UI toolkit that allows me to share code while maintaining platform consistency and native performance. I don’t have time to fix the memory consumption of Chromium. I’m going to write my Electron app in JavaScript, carefully, and hope the performance will be acceptable (but not great). I don’t see how that can reflect on any individual programmer poorly.
- bananaface 6y agoI disagree. As evidence: games are way more complex, have enormous teams, and manage to simulate an entire game world rendering render hundreds of thousands of polygons 60 times every second. Twitter crashes my browser.
- vsareto 6y agoThat's because GPUs are insane and purpose built. For an honest benchmark, you'd only look at instructions executed on the CPU which won't be any rendering, but stuff like world ops, AI, game flow. Some of those are not really that taxing. As an example, Stellaris had performance issues that were CPU bound for a while and it's gotten better. It's not a visually demanding game after all.
- bananaface 6y ago
- _____s 6y agoThe likelihood that people who created Electron don't understand caches or cache locality is close to zero. That's an oversimplification. Electron is a large project that does many things… there are many reasons why it could have been slow. Today there are many Electron based apps that are quite decent. > Knowing how to maximally exploit a CPU is way more important than knowing eight different Javascript frameworks if good software is your objective. And frankly, learning Node is way easier than figuring out how to structure basic, bare-bones Javascript so that it leverages your L1 cache. Learning Node isn't easier than learning how to structure basic, bare-bones code that leverages L1 cache. In fact, it's quite the opposite. You can learn cache locality as a concept in much less time than you would learn Node (or any programming ecosystem for that matter).
- bananaface 6y agoI don't buy it. Unreal Engine is a larger project that does many more things, and the speed at which it does them compared to Electron is not even in the same universe.
- aprdm 6y agoHow can you compare unreal engine with electron ?! That makes no sense at all.
- bananaface 6y agoThe fact that people think they're somehow fundamentally incomparable is the problem.
- aprdm 6y agoSoftware is all about trade offs. I would actually recommend you the book Software Engineer at Google since you mentioned them so many times: https://www.amazon.ca/Software-Engineering-Google-Lessons-Programming/dp/1492082791 https://www.amazon.ca/Software-Engineering-Google-Lessons-Pr... The first chapter is all about that and how software engineer isn't programming. You seem to think as programming and I believe you're missing the bigger picture.
- Whatanacc123 6y agoWouldn't it be great if we lived under a utopia where artisans can craft code like the statue of David? Too bad we live under capitalism and the supremacy of the minimum viable product. I laugh at my CompE graduates who think they're going to use any of their degree. The clients don't give a fuck, they will never see the code ever, they want quick and cheap.