Live data from Hacker News

Visual Studio Code 1.9

code.visualstudio.com

171–180 of 312 posts

Re: Visual Studio Code 1.9

#171
post #82

For those of you who use VS Code, how fast is it when grepping large number of files? Is it at least comparable to Sublime Text?

Can't compare to Sublime myself, but the global search got some major overhaul and is doing parallel searches since the last release (1.8). Can't complain about the speed.

Re: Visual Studio Code 1.9

#172

VSCode really does improve with each release, and the monthly cycle is just about the perfect pace. This is a great example of how to run an OSS project. I wonder how much Microsoft spends on it each month, and what value they see in it? Is it just a marketing expense? e.g. They fund VSCode in order to gain the good will of developers which they hope will turn into Azure or maybe Windows sales in the future?

I assumed the idea was also to eventually to get some users to move to the "real" visual studio, which I ended up doing at least to debug C++, except the vs editor is so much worse!

For example, I use Ctrl+D for multiple editing all the time and I converted other people to vscode based on that feature alone, yet it does not exist in visual studio...

Re: Visual Studio Code 1.9

#173

VSCode really does improve with each release, and the monthly cycle is just about the perfect pace. This is a great example of how to run an OSS project. I wonder how much Microsoft spends on it each month, and what value they see in it? Is it just a marketing expense? e.g. They fund VSCode in order to gain the good will of developers which they hope will turn into Azure or maybe Windows sales in the future?

VS Code is part of the strategy to get .NET Core distributed and to support the web layers built on top of that which mostly now use open source technology (from npm and bower through to grunt, typescript and angular)

Re: Visual Studio Code 1.9

#174

Earlier quoted context omitted.

I've used both extensively and I think they are fairly different, with different strengths and weaknesses. Bash is more pragmatic and more concise on the command line. PS is more uniform in its design and nicer for scripting IMO. It allows passing objects through pipes, has built-in JSON reading and writing, built-in parameter handling with defaults, mandatory and optional params, switches etc., and such niceties.

Bash is not more concise, its other way around, of course, if you use default aliases. The reasons is logical - you almost never use text parsing in Posh while you almost never have anything without it in bash.

I find Powershell non intuitive to learn honestly, Bash just clicks with me way more for some reason.

Re: Visual Studio Code 1.9

#175
Does anybody know a way to have better window management in VSCode? I really don't like to split always and use the mouse to drag and drop... often I use two panes and I want to duplicate view in them. Hoping for something like the Sublime Origami plugin (which was perfect for me).

Re: Visual Studio Code 1.9

#176

I keep trying VSCode, but the main thing that keeps me going back to Atom is the fact that I have to do everything at the command line or by editing an enormous json file. Maybe I'm spoiled, but I'd much rather have a nice UI to deal with settings than have to figure out that, say, in order to show line numbers I have to modify "editor.lineNumbers" and set it to "on" (or is it "true"? or 1? I can't remember... let me…

Take another look. What you get now is still a gigantic JSON file... except it opens in a two-pane window, with the default settings (including detailed documentation in comments) on the left, and your local copy on the right. And beside each setting on the left is an icon where, if you press it, it copies the setting into your local copy, with all the correct JSON syntax. And usually there's a dropdown showing the d…

Two things to add:

The settings files now have intellisense in them so you don't have to lookup each option.

You can also have a separate settings.json file for that project and check it into git inside the .vscode folder and make those same settings available to your entire team.

We use that in every project and it is great.

Re: Visual Studio Code 1.9

#177
post #97

Earlier quoted context omitted.

I would rather have devs invest time in serious functionality then doing stuff like GUI. Otherwise, this quickly turns to nonsence such as Nano server image builder [1] because Microsoft is still babysitting people who CBB to spend few hours to learn Powershell basics and need a GUI that generate 1 liner script. Microsoft should definitelly rise beyond click next culture. [1] https://blogs.technet.microsoft.com/nanos…

Discoverability and ease of use ARE serious functionality.

To be fair, the settings editor in VSCode shows all the settings possible in a split window with user settings, with neat categories and auto-completion. It's almost like a GUI setting dialog noways and makes it way easier to see what you have changed.

Re: Visual Studio Code 1.9

#178

Earlier quoted context omitted.

Seriously, Ctrl+Shift+P and start typing gets me to what I need 99% of the time, it's glorious. Combined with the VIM plugin and I rarely need to touch the mouse.

I didn't try vim plugin but in general, no vim plugin is substitute for vim.

If you mostly just want the memorized shortcuts to work, they tend to work OK in VSCode, Atom, IntelliJ and even Emacs - Spacemacs is even a better ViM for some.

Re: Visual Studio Code 1.9

#179
I really like VS Code, and try to use it as much as possible, but I can't make it my main driver until they've added more detailed theming support. Textmate themes aren't good enough. I can't get used to such basic highlighting that doesn't even come close to ReSharper's with "Color identifiers" enabled.

Re: Visual Studio Code 1.9

#180
post #125

This is an off topic, but I just learned from the article that PowerShell will soon be the default in place of cmd.exe in Windows 10. I welcome this change as I found the experience of using PS was superior to that of bash/zsh in general cases. But I hope they figured out the performance problem. As of writing, in the stable version of Windows 10, PS is perceptually slower than cmd, so I was forced to use PS only whe…

> the experience of using PS was superior to that of bash As a Linux dweller, I'm genuinely curious about this one. I've found PS inferior in just about any use case.

I had been a full-time Linux (desktop) user for more than 10 years, and only recently made a transition to Windows. As I'm nowhere proficient at using PowerShell I might be overrating it a bit, as the grass is always greener on the other side. Anyways, what I found to be satisfying while using PS were:

1. The input/output is done using objects. I know that "inter-process communication should be done with text" is the UNIX philosophy, and I appreciated that when using Linux, but after using PS I started to have mixed feelings about that. When using bash/zsh, I typically used awk to extract the data I wanted from the text emitted by an external process. Doing so isn't hard, mostly as simple as using `awk {print $3}` or something like that, but it is still a bit annoyance and more importantly, vulnerable to the changes in the output format.

PS cmdlets communicate with themselves using objects, so it is very easy to extract some columns out of the command results. For example, when I query about a process in PS:

  PS> Get-Process -Name chrome
  
  Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
  -------  ------    -----      -----     ------     --  -- -----------
      362      80   169636     109896  36,411.16    484   1 chrome
      497     113   274988     132544   5,161.00    656   1 chrome
      404      84    87444      55356     303.56    764   1 chrome
If I want to extract CPU time and process ID:

  PS> Get-Process -Name chrome | Format-Table -Property cpu,id
  
           CPU    Id
           ---    --
  36441.265625   484
    5163.09375   656
      303.5625   764
Let's see what processes consumed the CPU most!

  PS> ps chrome | sort cpu -descending | select -first 3
  
  Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
  -------  ------    -----      -----     ------     --  -- -----------
     1186     317  1876160    1055016  88,462.64  10524   1 chrome
     1023      88  1825008     668684  37,740.92   6128   1 chrome
      362      80   155776      64560  36,848.00    484   1 chrome
As you can see, I can simply specify the column name(s).

This is probably why many Linux commands have detailed options to limit displayed information. For example, `uname` has -s, -r, -m, -p, and many others that are just portions of -a. If it were in PS there would be no other options than -a and users could utilize it accordingly. Likewise `ps` has many options just to control the output which is again not necessary in the PS's side.

Also due to the probable scripts that may be reliant on the column orders (e.g. my script assumes the third column to be always the one I wanted, because I hard-coded `awk {print $3}` in there), it is very hard to change the layout of the output in Linux commands. In PS there is no layout in the first place, so this backward compatibility concern doesn't exist.

2. Command names are much clearer. Many names are pretty descriptive so I don't have to remember the exact abbreviated forms, but at the same time they provide shorter aliases. For example `Get-Process` can also be called `ps`. bash/zsh can also benefit from this by manually assisning aliases, but I believe "sane defaults" should be long-descriptive names first, and abbreviated forms later.

3. Much more objected-oriented design. Say for example you want to get the last modified date of a file. In Linux I'd use `stat` and somehow extract information from it. Or, `stat` may have some option to print mtime so I may have to google for it. In PowerShell, I can use this instead:

  $file = Get-Item C:\Windows\notepad.exe
  $file.LastWriteTime
This also applies to the process example above:

  $processes = Get-Process -Name chrome
  $processes[0].CPU
All of these are benefited by tab completion, so you can easily find what properties any object has. This greatly improves discoverability, so that I don't need to rely on documentations (man pages on Linux, MSDN on Windows).

Not only that, but PS is much closer to a general-purpose programming language than bash/zsh. It has built-in calculations (no need to rely on expr/bc), and it even has some basic type safety, such as:

  PS> 1 + 2
  3
  PS> 1 + "a"
  Cannot convert value "a" to type "System.Int32". Error: "Input string was not in a correct format."
  + 1 + "a"
  + ~~~~~~~
      + CategoryInfo          : InvalidArgument: (:) [], RuntimeException
      + FullyQualifiedErrorId : InvalidCastFromStringToInteger
which might be silently ignored in bash/zsh in most cases. As you can see it even has fixed-width integer types (Int32), which is rarely seen in dynamic languages!

When the logic of my scripts got complicated, I tended to abandon shell scripts and start programming in Python. But after learning PowerShell I'm starting to have a confidence that typical workflows can be implemented in PowerShell, in a readable way. I even think that PS can be utilized as a general-purpose programming language, like, "Python without dependencies", because PS is installed by default on Windows nowadays.

Whoa, my response got unintentionally huge O.o. Hope this helps anyone.

Post reply on HN