News for hackers. Stuff that matters.
Re:How much your computer can do in a second by sametmax on Sunday March 26, 2017 @01:20PM (#13961826)
It's wasted only if it's not traded for something else. But it is.

A lot of system would simply not exist if we would have waited for people doing it properly because there is a limited pool of very skilled experts and the demand for IT far exceed our ability to supply. Plus writing good code takes a lot of time and resources, but our society changes now so fast that it very well maybe rewritten next year.

Hence, we are trading computer power to compensate our limited human resource.

E.G: wondering why you see electron apps everywhere now ? Because until now making a beautiful, powerful and modern app with a portable GUI was something only a few people would be able to do. Now any web dev can do it, and they are able to solve problems that weren't solved before because nobody would be available to do it. At the price of performance, memory usage and the use of the ugliest programming language we ever made popular.

It's the same deal as before. When C arrived, Wordperfect died because they stick to assembly. For them, C was wasting resources.

When Java arrived, expert systems were turned to it because it was more productive than to write it in C. We didn't need it to be fast, but the companies wanted their tools to be produced quickly.

Then when the Web arrived, people were laughing about the quality of PHP (initially a Perl hack !). So many bad code, so many security fails, just a terrible, terrible stack of programming debt. But it created the web we have today because it was easy to use, and suddenly a lot of people could just write their web forum. Hell, I learned my job with EasyPhp.exe way before becoming a Python expert.

Nothing here is wasted. It's just implicitly and involuntarily invested.

Re:How much your computer can do in a second by aschampion on Sunday March 26, 2017 @01:51PM (#13962025)
> Because until now making a beautiful, powerful and modern app with a portable GUI was something only a few people would be able to do.

Except it's none of these things: electron apps suffer the same presentation-before-content problems as most of the web, they inherit all of the state bugs of web apps, and they're painfully slow despite usually just being menus of nested lists and text boxes. It's passing a burden from developers to users, which considering the huge asymmetry between these two groups that's typical (at least 3 orders of magnitude, and often 6 or more) is an enormous inefficiency.

I'm all for selecting tools and platforms to better optimize developer productivity, but it's not clear to me the web platform has actually accomplished that for all but a few types of applications, and pushing it to the desktop is resulting in cumbersome, unresponsive, needlessly fragmented interfaces.

Put simply: Amazon Music Desktop has untold development investment and a complete visual redesign every 6 months, but WinAmp circa 2001 is somehow a thoroughly better way of searching and playing music.

Re:How much your computer can do in a second by sametmax on Sunday March 26, 2017 @02:11PM (#13962148)
Let's be clear, I dislike slow apps, I think current behemoth web pages size is a monstrosity and every time I start an electron app (minus the excellent vscode), I scream in my head.

Yet.

Most electron app I tried have a ratio result/effort far better than any other solutions for the dev.

Re:How much your computer can do in a second by zeta0134 on Sunday March 26, 2017 @02:27PM (#13962248)
This cannot be understated. It really can't. The programmer in me will always be drawn to small, lightweight code that gets the job done while using minimal resources. But that programmer is an algorithmic designer, which doesn't often need to deal with the realities of UI, graphics card drivers, or cross-platform compatability.

Electron is popular precisely because it enables developers of nearly any skill level to solve real world problems without investing the additional time to become a systems engineer. And the truth of the matter is that there are many more real world problems that need solving. Computers are cheap, humans are expensive.

When performance matters, by all means, hire the expensive programmers and code it from scratch. Do it "right." But doing it at all is often the only thing that needs doing, and for those problems, Electron is often, begrudgingly, the best choice.

Re:How much your computer can do in a second by flukus on Sunday March 26, 2017 @09:51PM (#13964550)
> which doesn't often need to deal with the realities of UI, graphics card drivers, or cross-platform compatability.

What makes you think desktop programmers have to deal with graphics drivers? How is electron any better than desktop toolsets worse at dealing with the realities of UI work?

Re:How much your computer can do in a second by zeta0134 on Wednesday March 29, 2017 @04:51PM (#13990454)
For the graphics question, it really depends on how you define a desktop programmer. Most video game developers need to work with graphics at some point, and a great deal of professional creative software uses GPU acceleration. Whether you deal with the drivers directly or not, you're going through them, and end up bitten by weird bugs and platform inconsistencies in testing. (Why are my drop shadows pink? Oh, this is a known issue with Intel HD 4000 on OSX... that sort of thing.) To be fair, Electron doesn't solve this problem, and neither does any toolkit really, it just shifts the responsibility to the framework, rather than the application developer.

As for electron being better than existing toolkits as far as UI development? I don't think that's a fair assessment in either direction. It's a right tool for the job thing.

Electron's real strength is that it's web-based, so it's familiar to existing web developers. In that respect, it's a bit easier to use if you already know web technologies. But, it's not terribly good at native integration (Electron apps tend to feel like web apps because they are), and resource consumption is abysmal because it's going through the browser layer, and we all know Chromium isn't light on RAM usage. Other toolkits are far better at handling native platform integration and can be much more lightweight.

Again here, "better" is a really tough thing to define, as every team and project is going to have different priorities.

Re:How much your computer can do in a second by sametmax on Sunday March 26, 2017 @02:33PM (#13962283)
Honestly I will be able to accept the resource consumption in the long run. But the use of JS everywhere is the real hard part for me.
Re:How much your computer can do in a second by dottedmag on Sunday March 26, 2017 @02:39PM (#13962321)
WebAssembly and languages compiled to JS make it immaterial.
Re:How much your computer can do in a second by sametmax on Sunday March 26, 2017 @05:07PM (#13963301)
It has the potential to do so, but I'm waiting to see it for real before calling it. Right now it's just not the case.
Re:How much your computer can do in a second by millstone on Sunday March 26, 2017 @04:29PM (#13963083)
I'm not sure how. WebAssembly is more limited than JavaScript (e.g. no access to DOM), and also more limited than native code (e.g. much more limited threading story).
Re:How much your computer can do in a second by cryptarch on Sunday March 26, 2017 @08:18PM (#13964207)
I wonder how long after the WebAssembly DOM API becomes stable tbe first Rust-based "server and client written in one language" frameworks start popping up.
Re:How much your computer can do in a second by uryga on Sunday March 26, 2017 @05:32PM (#13963425)
I thought they were working on adding DOM stuff too?
Re:How much your computer can do in a second by stymaar on Monday March 27, 2017 @02:26AM (#13965576)
They are. And they are also working on having full multi-threading (thanks to SharedArrayBuffer).
Re:How much your computer can do in a second by flukus on Sunday March 26, 2017 @07:56PM (#13964118)
> Most electron app I tried have a ratio result/effort far better than any other solutions for the dev.

This is more about the experience of the developer. Anyone familiar with GTK or Qt (possibly others) should be able to bang out a UI pretty quickly, in many cases it will be much simpler than HTML+js+CSS. With Visual Studio you could slap together a win32 app pretty quickly.

But for some reason we decided we had to coddle developers who only know javascript.

Re:How much your computer can do in a second by reitanqild on Sunday March 26, 2017 @11:14PM (#13964873)
Cross-platform was mentioned upstream.

Microsoft finally seems to be learning now but I think it will still be a few years before people start creating cross-platform desktop sw in visual studio, if ever.

Re:How much your computer can do in a second by flukus on Monday March 27, 2017 @12:25AM (#13965167)
I think their intention is to make VS cross platform but not to provide a cross platform UI stack themselves. Even if they made any of their UI stacks cross platform, it wouldn't be particular compelling compared to something like qt (or GTK if you don't care about cross platform).
Re:How much your computer can do in a second by panic on Sunday March 26, 2017 @05:45PM (#13963483)
Why do we care so much about the dev? There are way more people who use a typical program than there are people who develop it, and these people often use the program more frequently than the developers make changes to it.

For example, if a feature is used every day for a year by 10,000 people, speeding it up by 200ms is worth over a month of developer time (200ms for 10,000 people over a year is 203 hours of time wasted, which is about 25 8-hour days, or five 40-hour weeks).

Re:How much your computer can do in a second by buzzybee on Sunday March 26, 2017 @06:12PM (#13963610)
This equation starts with 0 users and grows pretty slowly at first. It only flips once you have a critical mass of users, and by then it's "too late" to preventatively fix the architecture to bias to performance.

There are also lots and lots of products that take a "npm+glue" approach - they ship an initial version that leverages everything possible, and then run aground trying to make it to version 2, because the architecture is so reliant on the dependencies that it can neither be maintained nor support any additional features. This is a little bit different from the "Electron problem" in that it identifies a showstopper limitation to using developer-side easings, rather than a long-term paper cut issue.

Re:How much your computer can do in a second by panic on Sunday March 26, 2017 @06:24PM (#13963680)
This equation starts with 0 users and grows pretty slowly at first. It only flips once you have a critical mass of users, and by then it's "too late" to preventatively fix the architecture to bias to performance.

Sure, but everyone's always planning for the future when they choose databases, backend architecture, etc. Why not plan for the future in user experience, too?

Re:How much your computer can do in a second by photojosh on Sunday March 26, 2017 @07:53PM (#13964101)
Keeping I'm mind the things I've developed are niche and not large; a dozen users at one time is about as far as I've got....

With databases, I use SQLite for quick prototyping and single user apps, and Postgres for the multi-user ones. If I needed to scale, I'd optimise my queries better and consult an expert.

With backend architecture, I'm most experienced with Python, Django & Twisted. I know these are used in web-scale apps, so if I needed to scale, I'd once again optimise best I could and consult an expert.

Now, UI is a different kind of scaling problem, because ideally it's going to look and interact the same for 10 users as it does for a million. You're scaling based on the features you add as opposed to the number of users. How do you scale that?

I'd say it's just as is happening now; you rewrite the UI as you scale, because if your revenue grows with users, you can afford to. On mobile devices: web page -> mobile app with mainly HTML views -> full native UI. On desktop: background server + webpage (think Plex) -> Electron/web-tech-based app -> full native app.

The problem ends up being when your revenue is independent from number of users and you don't have the resources to do the rewrites. Or as is likely the case with apps such as Atom; a big part of your proposition is the availability of plugins from third-parties.

Re:How much your computer can do in a second by stymaar on Monday March 27, 2017 @02:36AM (#13965608)
> For example, if a feature is used every day for a year by 10,000 people, speeding it up by 200ms is worth over a month of developer time (200ms for 10,000 people over a year is 203 hours of time wasted, which is about 25 8-hour days, or five 40-hour weeks).

Is your company ready to pay $10-20k to its software supplier to save 200ms per person ? Rationally it may be a good idea, but I sincerely doubt anybody would pay for that.

Re:How much your computer can do in a second by kedean on Tuesday March 28, 2017 @11:12PM (#13983047)
You can't reduce it to those simple variables, though. What if the speedup is enough to remove multiple AWS servers, saving potentially thousands of dollars per year moving forward? What if those milliseconds are the ones that keep more users on your site, like in Amazon's famous search bar story?
Re:How much your computer can do in a second by BHSPitMonkey on Sunday March 26, 2017 @06:06PM (#13963583)
Who is funding the developer? Why should they spend $5k (plus the opportunity cost of not using that dev's time on more fruitful pursuits) on 2 weeks of micro-optimization so that their 10,000 users will each experience a speedup so small they'll never even notice (and certainly never pay extra for)? How do you justify that expense?
Re:How much your computer can do in a second by mrob on Sunday March 26, 2017 @10:39PM (#13964731)
200ms delay is easily noticeable. Even 50ms is noticeable. And latency is cumulative, and your user's hardware already adds some, so you never know exactly how much latency budget you have before the whole system feels unpleasant.

I think 25ms is a reasonable goal, and even 10ms wouldn't be a waste of effort. All interactive software should be written like a fast-paced action game.

Re:How much your computer can do in a second by panic on Sunday March 26, 2017 @06:22PM (#13963674)
I'm making a more abstract argument that doesn't have anything to do with money. The time people spend using a piece of software shouldn't be worth less than the time developers spend writing it.
Re:How much your computer can do in a second by BHSPitMonkey on Sunday March 26, 2017 @08:13PM (#13964192)
Okay, but under those conditions your argument can only be applied to a more abstract reality that isn't the one we actually live our lives in.
Re:How much your computer can do in a second by nemothekid on Monday March 27, 2017 @02:45PM (#13970515)
The time developers spend writing a piece of software is worth what people are willing to pay for it. It has everything to do with money - if the person using the software isn't willing to spend more for 200ms less in startup latency, it probably won't happen.
Re:How much your computer can do in a second by flukus on Sunday March 26, 2017 @09:54PM (#13964563)
> How do you justify that expense?

It makes it harder for your competitors to offer a better product.

Re:How much your computer can do in a second by pilom on Sunday March 26, 2017 @07:04PM (#13963879)
Pretty obviously, not all time is equal in the eyes of the company that owns the software. That month of dev time costs on the order of $10k-20k all it where the users time is free from their perspective.
Re:How much your computer can do in a second by jsudhams on Sunday March 26, 2017 @10:56PM (#13964794)
Only if those 10000 people do something else in that 200ms and also if they multitask it does not matter. Except in some HFT or other specific use cases, i dont think even 100000 will matter 200ms fix.
Re:How much your computer can do in a second by megablast on Sunday March 26, 2017 @06:07PM (#13963587)
Just like GUI apps then, Mac OS and Windows has many bugs, are painfully slow compared to no GUI, and create longer to write.
Re:How much your computer can do in a second by danellis on Sunday March 26, 2017 @02:57PM (#13962434)
> until now making a beautiful, powerful and modern app with a portable GUI was something only a few people would be able to do. Now any web dev can do it

Anybody could do it before, including web developers, using, say, Qt with C++ or Python.

Or are you suggesting that web developers are not capable of learning?

Re:How much your computer can do in a second by sametmax on Sunday March 26, 2017 @05:08PM (#13963308)
No I'm suggesting the ratio result/effort between a QT app and a electron app is strongly in favor for electron for web dev.

Actually I'm not suggesting. I'm witnessing.

Re:How much your computer can do in a second by ori_b on Sunday March 26, 2017 @02:30PM (#13962270)
I mostly do back end code. But when I look at electron and compare it to something like QT Quick, QT Quick looks much more pleasant and easy to use to me.
Re:How much your computer can do in a second by sametmax on Sunday March 26, 2017 @02:34PM (#13962287)
Electron targets front end dev and people with knowledge of JS + HTML + CSS.
Re:How much your computer can do in a second by ori_b on Sunday March 26, 2017 @04:18PM (#13962996)
So, your claim is that using electron has got nothing to do with it being easier or simpler. It's just running off inertia?
Re:How much your computer can do in a second by sametmax on Sunday March 26, 2017 @05:11PM (#13963319)
HTLM + CSS is right now the easiest combo to create a really custom UI. Try to do something very custo with QT or Wx that is portable and you'll notice it's way, way more work. Combine that with the face web dev already know HTML + CSS and the related tooling, and you got the answer.

Electron apps are slow, eats a lot of resources, weight a lot of Mo and don't have a native UI integrated with the OS. You really need a SUPER good reason to use it. And the reason is it's familiar, easier and more productive.

Re:How much your computer can do in a second by ori_b on Sunday March 26, 2017 @05:14PM (#13963337)
Is it? Looks pretty easy to me: http://doc.qt.io/qt-5/qtquick-canvas-example.html

You get a full scene graph to play with. What exactly do you think is missing? http://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph.html

Re:How much your computer can do in a second by chii on Sunday March 26, 2017 @06:05PM (#13963578)
the fact that you have to use a scene graph?
Re:How much your computer can do in a second by ori_b on Sunday March 26, 2017 @06:49PM (#13963816)
What would you use in HTML for a completely custom component? As far as I understand, you'd have to build your own scene graph on top of a canvas.

I mean, if you want standard or semi-standard components, QT has far more out of the box components than HTML does, but the initial complaint was about flexibility for doing something 'very custom'.

Re:How much your computer can do in a second by VeronicaHadley on Monday March 27, 2017 @02:40AM (#13965614)
QT Quick is really adorable way to put in programming logic with improved UI.
Re:How much your computer can do in a second by dotancohen on Monday March 27, 2017 @02:15AM (#13965542)
> E.G: wondering why you see electron apps everywhere now ? Because until now making a beautiful, powerful and modern app with a portable GUI was something only a few people would be able to do.

You should really take a look at Python and Qt. Beautiful, easily maintained and well-performing cross-platform apps have been a possibility with this pair for the better part of a decade. Anki is my favorite example, but there are plenty of others.

Re:How much your computer can do in a second by sametmax on Monday March 27, 2017 @02:23AM (#13965566)
I'm a python expert, I know. You are missing the point: electron apps target front end devs. They are more of them, a lot more, than any other type of dev and they don't want to learn a new tech. Hell they even ported js to the server, an awful language, to avoir using something else.

Plus saying qt is easy to use to them is like saying java is productive to a python dev. You are not on the same scale.

Re:How much your computer can do in a second by pjmlp on Monday March 27, 2017 @03:00AM (#13965687)
Front end web devs.

There are still some of us that do actual native frontends.

Re:How much your computer can do in a second by milesrout on Sunday March 26, 2017 @09:53PM (#13964559)
>A lot of system would simply not exist if we would have waited for people doing it properly

And we'd be better off. We'd be better off without Atom and VS Code.

Re:How much your computer can do in a second by nashashmi on Sunday March 26, 2017 @02:10PM (#13962138)
So by making a complex task much much easier, we have traded efficiency for larger numbers of wasteful systems.

The Crux of industrialization?

The future of mankind? Make task easy. Get more people to do task.

Re:How much your computer can do in a second by JustSomeNobody on Sunday March 26, 2017 @07:17PM (#13963923)
> E.G: wondering why you see electron apps everywhere now ? Because until now making a beautiful, powerful and modern app with a portable GUI was something only a few people would be able to do.

Take portable out and it gets so much easier.

Re:How much your computer can do in a second by jerrysievert on Sunday March 26, 2017 @11:37PM (#13964981)
take out beautiful and it gets so much easier too.

I guess that gives us:

* portable

* beautiful

* fast

(choose 2)

Re:How much your computer can do in a second by K0SM0S on Monday March 27, 2017 @08:28AM (#13967097)
That was so acid. ;-)

But besides my pun, "fast" code is a moving target relatively to the end result (see how performance considerations about Java running in a VM became moot because of hardware improvements notably on the CPU; see how today multithreading is making a comeback to rescue CPU-bound applications from stale improvements).

Fast is also subjective, it's cultural in that it's a trained perception. I'm annoyed if Excel takes more than a couple seconds to launch, but most people are used to 10s at least, because that's our daily experience. Likewise, I remember a time when having pixelated thumbnails until images loaded completely over dozens of seconds was the best browsing experience; nowadays on fiber/LTE we expect a page to appear rather instantly.

I guess what subconsciously annoys the hell out of "those who like as fast as possible applications" with Electron is that we know it will yet make fast a more distant concern overall, at least until hardware makes the Electron performance penalty moot, like Java VM.

I'm pretty convinced 'fast' is indeed a clear third priority for most consumers though, seeing how it doesn't seem to bother most people in UX research (less so than many other concerns), or how Apple rides ever more financial success while releasing ever slower hardware and software (comparatively to the whole market, and sometimes astonishingly even to their own previous models). Facebook is bloated as hell too these days, but it's as popular as ever. Spotify is sluggish too, even Twitter. People just don't seem to care, the looks and simplicity of use seem more determinant.

Re:How much your computer can do in a second by mr_overalls on Monday March 27, 2017 @10:55AM (#13968208)
"Everything is for the best in the best of all possible worlds." --Candide, Voltaire