News for hackers. Stuff that matters.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by mercer on Saturday April 08, 2017 @05:00AM (#14066059)
Personally I think that trotting out this argument in every single post about VSCode/Atom/Electron/etc. serves absolutely no good purpose at this point (other than upvotes or the pleasure of expressing an opinion, perhaps), but I'm happy to be corrected.

That said, I'm also still using Sublime Text / vim primarily because they do feel faster on startup and handle big files well.

But I think rationally it would make sense for me to move to VSCode, because 1) my code editor is almost always open, and 2) I rarely need to edit really large files, and 3) VSCode is plenty fast for pretty much all other use cases and offers a whole bunch of advantages over ST.

Atom I'm less sure of. It seems to get faster every few months that I give it a spin, but it still feels 'laggier' even in normal use, which is definitely a problem for me.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by blub on Saturday April 08, 2017 @10:41AM (#14067125)
It serves a very important point: showing that mediocrity will not be silently tolerated.

I understand that productivity is important and a significant number of web developers can't seem to learn anything else except JavaScript or worse, don't want to, but such things as professional pride, craftsmanship and excellence do exist and are very appreciated.

Those things represent the opposite of building software applications in JavaScript. I don't know why others criticize such apps, but that's why I do it: they are normalizing flawed software and a lousy experience and mixing it with extreme arrogance.

I've had this deep disagreement with various people ever since web apps were invented. The best of the best of these apps sucked then and they still suck now and are a waste of everybody's time.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by pcwalton on Saturday April 08, 2017 @01:03PM (#14067850)
Come on. There are lots of JS developers who care a lot about "professional pride, craftsmanship and excellence".
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by blub on Saturday April 08, 2017 @01:32PM (#14067974)
Building desktop (or mobile) apps in JS is not compatible with craftsmanship, nor is it compatible with excellence.

To those that truly care about excellence and don't merely pay lip service to it, there is only one way of building: using that platform's native toolkit. For project or ideological reasons one can make a compromise and use something like Qt, Xamarin or wxWidgets, etc.

This leaves JS native-like apps for those that care about doing things fast by only using the knowledge they already have. That would perhaps be understandable, if they admitted that it's a big quality and performance compromise. Yes, we tried our best, but this is the only thing we could do with this budget/team/whatever. Totally fine.

Instead we get uppity devs claiming that desktop apps will be killed and bragging about how they're delivering the best experiences. It's this toxic cocktail of arrogance and lack of ability that is intolerable.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by derefr on Saturday April 08, 2017 @03:37PM (#14068581)
> This leaves JS native-like apps for those that care about doing things fast by only using the knowledge they already have.

What about the devs who care about shipping a lockstep-feature-parity multiplatform app, and are willing to go through whatever hassles it takes to get "write once, run [with platform-conformant controls + behaviors] anywhere"? Because that—and not "doing things fast" or "only using the knowledge they already have"—is the argument I hear for developing Electron apps.

What would you suggest for those developers? Just give up on their desires and do 10x as much work (likely meaning being 10x as many people) to ship for every platform, like Facebook? Or go through months/years of initial effort to develop a cross-platform UI toolkit abstraction to build their app upon, like the browser chrome of Firefox and Chrome is targeted at? Use something like Java's Swing, and pretend that's better just because "at least it's not Javascript"? Ship a GTK or QT app that doesn't look/work natively on half your platforms?

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by pseudalopex on Saturday April 08, 2017 @08:01PM (#14069751)
When I've worked on multi-platform apps, the case for "write once, run anywhere" has always boiled down to developer hours and current knowledge. Sometimes someone suggests that a single GUI will mean less code and fewer bugs, but the ones with cross-platform GUI experience know that's optimistic.

"10x as much work" is a huge overstatement, especially when platform conformance is a goal.

For native look and feel, I'd pick Qt over Electron any day. The catch is that no toolkit can abstract away all the platform-specific details. A minimum-effort Electron app looks like a web page; a minimum-effort Qt app falls into the uncanny valley.

There can be good reasons to choose Electron! But it also has drawbacks, and it isn't the only option.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by pcwalton on Saturday April 08, 2017 @02:23PM (#14068225)
> To those that truly care about excellence and don't merely pay lip service to it, there is only one way of building: using that platform's native toolkit.

Since you are clearly an expert here, can you explain to me how an immediate-mode API from the 1980s in which all painting is done via the painter's algorithm and context switches to kernel mode on every operation is superior to a declarative model that allows for global optimizations to minimize state changes and batch draw, in addition to using hardware Z-buffers to minimize overdraw?

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by blub on Monday April 10, 2017 @03:55PM (#14081986)
I'm not an expert and I don't want to be one, I just want to have access to quality tools (preferably open source) and I want the majority of developers to use those tools. Native UIs are efficient, web UIs aren't. It doesn't matter to me that they're built using painters, batch drawing or pixie dust as long as the API is sane and performant.

I think your post is a nice summary of the thinking that got us here in the first place: experts always looking at the possible future optimizations and not stopping to think at the present quality or if it's at all reasonable to build complex UIs in a document mark-up language.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by mixedCase on Saturday April 08, 2017 @02:55PM (#14068362)
Aren't you the guy behind this https://github.com/pcwalton/libui-rs ?

Kind of strange to write bindings to something you hate so much. Or was it a changed of mind in the last 11 months?

With that said, I do agree with you, but there's not a single solution out there that does this efficiently, a browser is a ginormous level of indirection after all.

But if you want to spearhead such a thing I'm sure as hell interested.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by Rapzid on Saturday April 08, 2017 @05:00PM (#14069012)
What is this comp sci politico? Somebody writes a few bindings and that's evidence of their UI party affiliation?
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by mixedCase on Saturday April 08, 2017 @05:20PM (#14069097)
What the hell? I knew the bindings because I've been investigating GUI solutions for Rust for the past few days, and was very surprised to see the author speak so poorly of a solution he poured time on; now people treat technical doubts as some sort of witch hunt?
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by Rapzid on Saturday April 08, 2017 @06:48PM (#14069488)
I apologize if I miss-read that. At first it seemed like you were questioning his opinion based on his binding work.

This whole section has a very polarized/aggro vibe that's putting me on guard against false dichotomies and dogmatic arguing :| I need a chill pill myself.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by pcwalton on Saturday April 08, 2017 @03:10PM (#14068454)
Yeah, I wrote those bindings, though they're incomplete, and libui's memory management is so broken that I lost interest in finishing them.

It's a fair point, however. :) Much of my interest in libui was (a) to provide platform support for the browser engine; (b) to provide a solution for simple projects that don't want large dependencies. I've always believed the native UI frameworks from the '90s to be poor fits for modern graphics hardware. But sometimes your workload is so simple you don't care about whether your UI is as fast as possible, and minimizing dependencies is a more important criterion. That's where simple native UI layers can be a good fit.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by mixedCase on Saturday April 08, 2017 @03:48PM (#14068637)
> I've always believed the native UI frameworks from the '90s to be poor fits for modern graphics hardware.

Is there anything out there taking a better approach that works for native desktop? React Native and Flutter look like interesting solutions, but RN attempts to do all the hard work with JS, which is far from ideal; and Flutter is limited to Dart (which not that much better) and isn't getting any traction on desktop outside of the experimental Fuchsia.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by pseudalopex on Saturday April 08, 2017 @09:26PM (#14069985)
To me, "native toolkit" means standard UI elements, not the lowest-level API.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by city41 on Saturday April 08, 2017 @07:35PM (#14069664)
In today's world of text editors, I'd take VS Code over anything. Anything at all. This notion that webapps must be bad is ludicrous.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by city41 on Saturday April 08, 2017 @07:33PM (#14069658)
How large of a file are you talking?

I just opened a 9.75mb JavaScript file in VS Code and it edits it quite well. It syntax highlights the top of the file immediately, and it does take quite a while for the highlighting to work its way down the file (I'd say about 20 seconds). But as far as editing goes, you can jump anywhere in the file and edit without any hesitation, instantly.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by criddell on Saturday April 08, 2017 @07:49AM (#14066495)
People invest quite a bit of time into their tools. When something new comes along and gains traction, it threatens that investment. Maybe VSCode gets so popular that $EDITOR stops getting updated?

Otherwise, there really isn't any reason why I should care what tools you use.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by nottorp on Saturday April 08, 2017 @05:41AM (#14066174)
Well, the main question is still "why oh why?". It's not like Microsoft can't afford to pay developers to do something native.

Also, calling it Visual Studio is very deceptive. Most devs know VS to mean something completely different.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by taude on Saturday April 08, 2017 @08:48AM (#14066647)
As a VSCOde user on both Mac and Windows, I'm not sure they needed to do anything native. Seems like wasted work, when what they've ended up with is plenty fast and looks good in both environments.

I'm not using VSCode to edit one-off files from my terminal. The use case is for your folder-based projects. I generally open it once/week or reboot, etc, and finds it loads, mounts my folder and I'm done in the amount of time it takes me to grab a sip of coffee.

I think too many people base speed because they're used to one-off editing files directly from their filesytem. At this point in time, I only do this when editing config on remote servers and such.

EDIT: I just went and opened VSCode from my terminal and it took about 3.5 seconds to load up an entire React Native project on a three year old 11" MacBook Air.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by tracker1 on Saturday April 08, 2017 @11:40AM (#14067425)
Yeah, "Visual Studio" is a big, slow, bloated mess, that when working on a typical project, especially web projects will just freeze out regularly and plugins will stop the world, doing who knows what.

VS Code actually loads faster, doesn't freeze as much, and in general runs faster than any IDE I've ever used. And I've used a few. There are faster code editors, but VS Code is a bit more than most of them, but less than a full IDE typically is.

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by jeremy_wiebe on Saturday April 08, 2017 @11:15AM (#14067303)
They have done something native...for many, many years. It's called Visual Studio.

VSCode has found a place in my workflow now and I don't care what language or platform they've used. It's proven to be more full-featured than competing editors and they are improving it much faster than other editors (based on my completely non-scientific, possibly biased observations).

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by simooooo on Saturday April 08, 2017 @07:53AM (#14066501)
Probably to not have to write a cross platform UI library and encourage contributions by using a wildly popular language
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by mercer on Saturday April 08, 2017 @05:57AM (#14066210)
> Well, the main question is still "why oh why?". It's not like Microsoft can't afford to pay developers to do something native.

Yeah I do share that question with you and would love an answer from the team!

> Also, calling it Visual Studio is very deceptive. Most devs know VS to mean something completely different.

Could you clarify what you mean with that? Accusing me of being 'deceptive' seems a bit unwarranted and disproportionately antagonistic, considering that as far as I can tell I've made a clear distinction between VSCode and VS (meaning Visual Studio proper), and considering that I can't think of any reason why I would choose to deceive in this matter. Where did I go wrong?

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by TeMPOraL on Saturday April 08, 2017 @06:00AM (#14066221)
I think the parent didn't mean to accuse you, but Microsoft, for re-using the "Visual Studio" brand in a product so completely different that it deserves a distinct name.

Reminds me of how pissed I was with Amazon calling their line of regular Android tablets "Kindle Fire". I don't know what the sales teams there think, but for customers, the "Kindle" brand was literally synonymous with "that e-ink screen thing".

Re:Visual Studio Code: Shipping One of the Largest Microsoft... by tracker1 on Saturday April 08, 2017 @11:43AM (#14067452)
I'm more pissed about VS for Mac than VS Code... if I were to call out naming something badly.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by nottorp on Saturday April 08, 2017 @10:45AM (#14067147)
That's correct, I was talking about Microsoft.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by mercer on Sunday April 09, 2017 @03:36AM (#14070965)
Ah, fair enough. Was confused there for a bit.
Re:Visual Studio Code: Shipping One of the Largest Microsoft... by tracker1 on Saturday April 08, 2017 @11:42AM (#14067443)
The editor "Monaco" was already written... it was for VS Online. They took the already written editor, Electron (Atom Core, etc) from the Atom project (another editor) and grafted the two together. Atom's editor at the time was horribly slow... Electron + Monaco actually worked well.

They've spent the time since then working on actual features... while they'd probably have just barely released anything if they had to do it all in C++, and wouldn't have nearly the depth of extensions they do.