Live data from Hacker News

VS Code can do that?

vscodecandothat.com

171–180 of 280 posts

Re: VS Code can do that?

#171
post #61

Slightly off topic but this code in example #5: get() { return new Promise((resolve, reject) => { fetch(`${baseAPI}/heroes`) .then(response => response.json()) .then(json => resolve(json)) .catch(err => { reject (err); }); }); } Why not just: get() { return fetch(`${baseAPI}/heroes`) .then(response => response.json()); }

Because he needs it wrapped in a promise, sending a resolve/reject?

Re: VS Code can do that?

#173

Earlier quoted context omitted.

In general, one should serve HTML on the web unless you're doing something that requires JavaScript. JS is a big security/privacy risk. At the moment, I keep JS and CSS off by default on my main browsing profile, overriding it with umatrix when a site requires it and it looks useful enough to bother.

In general, one should consider the audience of the content, not NoScript users, in this case. > JS is a big security/privacy risk. No, 3rd party JS (and 3rd party cookies, JS regardless) allow you to be tracked. And ad-blockers deal with that. Blocking 1st party JS is of tenuous benefit w.r.t security/privacy.

Sometimes "3rd party" JS is served from within the page. Also many sites are hacked and will cloak the JS depending on how you visit the site. It's especially common with hacked WordPress sites.

Re: VS Code can do that?

#175

Earlier quoted context omitted.

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…

One of the increasingly popular uses of JS is to save bandwidth. Using JS, you can ask the browser if the user is on a metered connection or an unlimited one, what their estimated bandwidth capacity is, what their real resolution is, and load appropriate assets (or conditionally load content). With JS disabled, a user on a pay-per-kilobyte 360x640 cellphone is going to get assets deemed acceptable on the manager's 14…

Why, if your goal is to save bandwidth, would you have the system default to loading the biggest assets when you can't ascertain these things, instead of loading the smallest ones?

That said, given my experience of running the web with NoScript, I'd be surprised if those sites that double the usage when they can't detect these things come anywhere close to eating up all the bandwidth I'm saving by not loading auto-playing video ads.

Re: VS Code can do that?

#176

Earlier quoted context omitted.

The audience for this site is front-end developers. Front-end developers don't tend to view the web with NoScript. Just like 99% of users don't view the web with NoScript.

Is it just for front-end developers? I'm a back-end developer, but, when I wanted to indent that HTML in order to post it, I switched over to the instance of vscode that I virtually always having running in order to use its pretty printer.

> Is it just for front-end developers?

1 out of 15 examples (the Docker one) don't involve HTML or JS. (And backend JS devs are generally pro-JS so likely aren't using NoScript either).

Do you use NoScript? Maybe you do and you're the <1%, but fact is even if you do, both you and GPP turned it off to view the site already ...

Re: VS Code can do that?

#177

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.

It’s a page aimed at web devs, evangelizing an editor written in JS. If you want to read it, turn on JS. If you turn off a key component of the modern web, you should expect that things will break, and not complain about it.

Re: VS Code can do that?

#178
post #138

Earlier quoted context omitted.

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.

In general, one should serve HTML on the web unless you're doing something that requires JavaScript. JS is a big security/privacy risk. At the moment, I keep JS and CSS off by default on my main browsing profile, overriding it with umatrix when a site requires it and it looks useful enough to bother.

off topic, but how do you turn off first-party JS in umatrix? I switched from NoScript recently, and haven't figured it out yet.

Re: VS Code can do that?

#179
post #90

Is there a way to have intellisense sense work with python dictionaries? It seems like intellisense for json would be a similar issue as nested dictionary representations in json, but I can’t find anything that does this and don’t want to use another class just for faster coding.

You'd need access to the runtime environment in order to do that. That said I wish somebody would make an IDE that would tightly integrate IPython so I could get IDE autocompletion in a paused test. I spend way too much time writing code in IPython prompts and copying it back.

You can check design time for any strings placed in source. Which is really what I want. I don’t need intellisense for stuff populated at runtime as much.

Re: VS Code can do that?

#180

Earlier quoted context omitted.

In general, one should serve HTML on the web unless you're doing something that requires JavaScript. JS is a big security/privacy risk. At the moment, I keep JS and CSS off by default on my main browsing profile, overriding it with umatrix when a site requires it and it looks useful enough to bother.

That's bezerk. You should turn off the CPU in your computer, too, and just use the screen and keyboard. The CPU is where all the security breaches happen.

That's like saying that you shouldn't bother eating healthily because if you're really concerned about heart disease you should just have heart removal surgery.
Post reply on HN