Live data from Hacker News

VS Code can do that?

vscodecandothat.com

141–150 of 280 posts

Re: VS Code can do that?

#141
post #45

So honored to see Prettier being the #3 tip!

I'm an evangelizing convert to Prettier. I was hesitant about it until I tried it, but... I am sold on it now. Prettier has costs- there are cases where I'd like to format things based on semantics not syntax, to show intent, and Prettier can't read my mind (feature request: make Prettier read my mind.)

But the costs are more than offset by the benefits. I didn't realize how much of a cognitive burden thinking about formatting was until I stopped thinking about it, and it turns out that using formatting to signal intent is perilous when people don't agree on how formatting signals intent.

I'm pushing to have Prettier used across all our JS code- there is some resistance to the idea of running it across a several hundred k line non-prettified codebase and some resistance to the idea of using it at all. And this causes problems. Prettier is best when you use it for everything.

But I'm pretty sure we'll eventually just move to prettification. It seems like the right thing to me, and I'm generally right ;). Anyway, thanks for Prettier- I am not actually a huge JS fan despite mostly writing it professionally, but Prettier does away with some of my complaints about JS, and just generally makes my life easier.

Re: VS Code can do that?

#142

In the spirit of cranky HN bikeshedding, I present: The page body, as seen by a NoScript user: Web developers: Please, you can do better than this.

Like holy shit, how can a webpage displaying text and videos slow my supercomputer to a halt. Truly a feat of technology.

Re: VS Code can do that?

#143

In the spirit of cranky HN bikeshedding, I present: The page body, as seen by a NoScript user: Web developers: Please, you can do better than this.

There certainly should be a static page version. Especially since there is barely any interactive element to this, it's essentially just a list of links

It is certainly an interesting choice to use a fully fledged SPA framework to render a static page. And since it runs on Azure App Services, I'd say server side rendering should be possible.

Re: VS Code can do that?

#144
post #138

In the spirit of cranky HN bikeshedding, I present: The page body, as seen by a NoScript user: Web developers: Please, you can do better than this.

Please know that no one really cares. You must realise you cannot expect to consume our applications but only on your own terms. Theres no contract saying you should ONLY serve HTML on the web.

I can't speak for gp, but the reason I whitelist Javascript is because the dozens of third party scripts pages load provide no benefits to me as a user and only waste my bandwidth and cpu while risking my security and privacy. Sometimes the first-party scripts do something useful and I enable them.

That a simple document with embedded videos "needs" js to load at all is sheer lunacy. The modern web is a massive house of cards. I don't want to be uncivil but I find it very hard to understand how anyone thinks they're doing good work after they create a simple (and useful!) web document that requires javascript to load.

If you're using Javascript to make a web application, fine, clearly there's no reasonable alternative. But if you need Javascript to produce a web document, what are you doing? I wonder how much more electricity is being consumed annually processing utterly pointless Javascript.

Re: VS Code can do that?

#146

My favorite is multi-selection mode. It's not the same as "Column Mode" you find in other IDEs but try it and you will never want another editor again: (Option)Alt-Cmd + Down or Up arrow key From there, you can use arrow keys as normal, but instead of controlling one carrot, you control all the ones you created. So if I use the shortcut key to move to the next word, they all do, same with end of line, or what have yo…

Sublime's multicursor works the same way, I believe.

Re: VS Code can do that?

#147

Some other ones: - In the Git view, select a modified file, select some lines of code you modified, cmd shift P, Git: Stage Selected Ranges. I dropped my dedicated Git GUI since I know this trick. - If you spend a lot of time coding in React, and have half of your files named index.js, do yourself a favor, go in the settings and add "workbench.editor.labelFormat": "short" (display the name of the file's folder in all…

For those who prefer the console with "tig" ui you can stage lines:

  tig status=> 1 to stage line, u to stage a hunk, \ to split hunks, ! to revert

Re: VS Code can do that?

#148

Earlier quoted context omitted.

I think loop unrolling is super cool. We're typically trained in programming to try to eliminate the kind of reuse that unrolling typically looks like, but when applied properly it can work really well. I guess that applies to most tools, though.

Can you give us an example where manual loop unrolling would be desired over a for loop?

Languages/compilers that don't do loop-unrolling automatically. If they do, then yes, it's probably best to let the compiler do it.

Re: VS Code can do that?

#149
post #45

So honored to see Prettier being the #3 tip!

Prettier is the greatest thing since sliced bread for the frontend world. Seriously - not having to think about formatting (esp. breaking lines!!) is a huge boon to development

Thank you

Re: VS Code can do that?

#150
post #105

I recently switched to JetBrains products. Their IDEs are much smarter. Infinitely better than VS Code, Sublime and whatnot. It's the closest thing to pair coding!

I'm also partial to WebStorm. Local history feature of Eclipse derivates has saved me enough times to make it a core pre-requisite when considering another IDE. Fwiw, VS Code has better typescript support.
Post reply on HN