skysight-inc/HackerNews huggingface dataset:
JS is very useful in many cases. Don't just think about documents or single blog posts in those cases static content should be sufficient.

But the web evolved to be way more than being a dumb content delivery pipe, it's an application development platform bypassing the underlying OS.

So ask yourself, if you need well behaved image galleries, do you need JS? Yes.
Do you want to avoid page reloading to navigate? You need JS.
Do you want login/form validation? You need JS.
Need an inline calculator?
Update content from the server?
Monitor the progress of a long lasting server job?
Add any logic to a shopping cart?

And these are very simple use cases, web apps are needless to say changed the way we ship apps and they all rely on JS.

I'm very much in support of offloading as many tasks to CSS as possible, but JS is hard to avoid if you want to do anything beyond static content delivery.
Web pages were better than web apps. Whisper it.
I've not read a positive article about Elon Musk for a while now.

Why would anyone want to work in places like this?
It happened because most people don't build websites themselves, they contract the work out. And when you look for contractors who build websites, you'll find JS developers, because that is where the lucrative work is therefore that is what developers learn.

There is no pushback on it because as long as it works, people are happy and continue paying. And none of the clients test with js disabled.

Devs use it because the moment the client needs something somewhat dynamic, some js will need to be included anyway so you might as well use your usual stack.

Basically "why do people use js where HTML does the trick" is the same question as "why do people use python where c89 does the trick"
No picture of any newly built factory... (soon to be torn down or sold) or the concrete buildings that still make the cities ugly.
Ask HN: What do you do when you loose your motivation?
not specific for developers but as a developer I sometimes feel unmotivated, depressed, underachiever. So in order to gain momentum again, what are you doing? or how do you gain your momentum again?
Thank you.
It is fascinating.
Not with text markup, but you could just use canvas or svg.
Authenticated routes for React, with Navi
Poorly implemented JS makes websites slower. Well implemented JS makes websites faster. The lesson here is not "use less JS" because you'll miss out on some things that JS can do that actually improves (perceived) performance, but rather it's "Use JS intelligently or risk harming your site's performance." The raw number of downloads doesn't impact the speed at all if most of them are done asynchronously in the background while the browser is idle after the first paint and after the page is interactive.

Developers seem to have forgotten progressive enhancement entirely and just piled more and more JS in to the first page load. Consequently users complain about JS, but JS itself is not the problem. There are patterns for building websites that are fast, in terms of both literal download and rendering speed and the perceived speed the user feels. We 'just' need better developers who actually care about the sites they build.
> You don't need this for a page to serve a socially useful purpose.

You don't need JS to "serve a socially useful purpose" most of the time, as well.

As I said, it seems we decided that everything needs to feel like an app.

95%(yes, I'm probably exaggerating) of the actual value of the today's websites could be plain documents with links to each other.

But try and suggest to anyone you're gonna have a company presence site(or anything for that matter) with no JS at all, and see where it gets you.
I'd love to hear anyone involved in this process answer the question: "Why wasn't any of the thousands of COTS solutions chosen instead?"
Using .NET Core on production here.

> but delivering solutions on time and with minimum maintenance requirements afterward is just easier in python or JAVA

I would agree if you would replace Python/Java with Node, but with these languages I don't see it.

> on time and with minimum maintenance requirements afterward

This is my Dockerfile, it is serving me without changes (technically replacing 2.1 with 2.2 is a change) for more than 6 months.

# Build assets
FROM node:8-alpine AS assets
WORKDIR /app
COPY src/Website/Package.json ./Website/package.json
COPY src/Website/Gulpfile.js ./Website/
COPY src/Website/Static/. ./Website/Static
WORKDIR /app/Website
RUN npm install
RUN npm run build

# Build project
FROM microsoft/dotnet:2.2-sdk-alpine AS build
WORKDIR /app
COPY src/Website/*.csproj ./Website/
WORKDIR /app/Website
RUN dotnet restore
WORKDIR /app
COPY src/Website/. ./Website/
WORKDIR /app/Website
RUN dotnet publish -c Release -o dist

# Run project
FROM microsoft/dotnet:2.2-aspnetcore-runtime-alpine AS runtime
WORKDIR /app
COPY --from=build /app/Website/dist ./
COPY --from=assets /app/Website/Static/dist ./Static/dist
RUN rm /app/Data/Log/.gitkeep

ENTRYPOINT ["dotnet", "Website.dll"]

>But maybe I’m missing something?

I think you might be.
journalism is actually extremely cheap, and is probably why the NYT finds itself in the unenviable position of playing second fiddle to new medias these days
> As a matter of fact such reflection is only needed because languages like Java or C# have very weak static type systems, compared with other languages in the ML family. With an expressive type system, you never need reflection capabilities.

The implication here is that you never need runtime type checking, which clearly isn't the case in ML family languages. Sum types for example have an abstract representation that must be resolved at runtime (for pattern matching).

C# also doesn't need reflection to resolve types (other than through the virtual route - i.e. inherited method resolution), this is a core feature of the CLR though (via `callvirt` [1] if I remember right) and not a weakness of C#'s type-system. C# bakes the concrete generic types into the generated IL.

[1] https://docs.microsoft.com/en-us/dotnet/api/system.reflectio...
Easy with the criticism folks. This is just the first version. All the confusion will disappear with Google One 2.0
That's why they added the splash animation. Which also has to be downloaded.
An experiment in controlling how much of Scrabble is luck
Because of the explosive growth and fast paced advancement of the web, most developers are mostly copy/pasting and gluing modules together. When the customer asks for a "image slideshow" they are not going to write one from scratch, even though it's just 10 LOC, they are going to bring in a library/framework which already has that functionality.
The odds are pretty high. A bunch of google "apps" are pretty inefficient. Like every company, Google has a spectrum of good, ok and bad programmers. It seems like they are working hard on making gmail slower every release.
Absolutely. The obsession with trying to turn every part of software engineering into something you can generalise and framework on the frontend is the cause of our current woes.

In the post Flash days I was accepting of pushing JS use as far as possible but the fragmentation and complexity that seems to just have become implicitly accepted is just something I'm much happier looking at from a distance than wanting to ever get involved in again.

The fact that it's more difficult setting up a JS project than it is for, say, Scala which is itself a pain in the ass speaks volumes.
It's the fault of giving every random webpage the ability to run a programming language in the browser.

For 99% of the web a markup language with triggers and async loading could have been enough to implement menus, upvote posts, post login forms, and so on.
Hubble finds far-away planet vanishing at record speed
JS should be used only/mostly for SPAs. and here and there to validate forms or other optional small enhancements, most websit6es that are linked here are not SPAs so should work without JS
more than one, it's a foreach loop, each one of those block the browser while the script downloads and executes.

Another epic fail by the bunch of 5 year olds that maintain this terrible CMS.

No wonder the ecosystem is full of slow and insecure themes and plugins if the code they're basing it on does things like this...
Build Desktop Apps with Angular and Electron.js – HelpDev
Could Microsoft release a desktop Linux?
Thanks. Hmm. It wasn't very obvious then.
And the best part is that you can use this line over and over again:

e.g. https://www.theguardian.com/business/2018/dec/12/capita-fail...

And an older summary: http://davespartblog.blogspot.com/2006/03/why-it-gets-called...

(See also Private Eye passim)
You need to be pretty damn high up in a company to overrule the business reasons for trackers, and perhaps more critically, helpdesk widgets. The size of the very common Zendesk widget is obscene.
The prize will go to the first person to build a full von Neumann machine using Google One and Coke Zero.
Thanks for clearing that up, my nigga.
> The relevance to parachute use is that individuals jumping from aircraft
without the help of a parachute are likely to have a
high prevalence of pre-existing psychiatric morbidity.
Individuals who use parachutes are likely to have less
psychiatric morbidity and may also differ in key demographic
factors, such as income and cigarette use. It
follows, therefore, that the apparent protective effect of
parachutes may be merely an example of the “healthy
cohort” effect.
Probably it is not the specific language that is to blame here, but the fact that websites are programs at all.

We all know plenty of slow Python, C and C++ programs.

I think there are some general "laws" that dictate this

1. all things that are programmable will be programmed at some point

2. all programs, no matter what language, we become as slow as the users will tolerate
Millions in Student Loan Debt Discharged by Dept of Education Court Battle
I feel it's too late to escape the web browser being established as an application distribution platform - though if you're building a document, then you it to your users and your own dignity, to make it like a document, not an application. Most websites are more like documents than apps.

But my comment applies to apps as well - just because you need to write actual software, doesn't mean you should throw away sensible engineering, and produce a bloated, user-hostile, spying & battery-devouring monster. Yet this is what seems to be coming out of most web shops these days.
It is not the fault of JavaScript. The article points out very directly the violator is third-party code. As a result I blame marketing and media for all that spyware/analytics bullshit that is thrust into the page.

EDIT: As I wrote this comment the title here was edited to directly reflect the nature of my comment.
What do you mean by low level? I can implement .net core web apps pretty damn fast...

Plus you get a decent static type system!
Fact Sheet: New Intel Architectures and Technologies
Out of curiosity, do you feel you can compete with people who have advanced degrees in more quantitative sciences?

Although I'm in the process of plugging several holes in my own math education, I don't believe I'd be able to get any interesting, ML related jobs. I also don't see myself able to perform well in comparison, given that I lack the mathematical intuition one builds after several years of (almost) daily practice.

(I hope I don't sound discouraging, relearning math has been quit fun so far and made me able to understand more of everything).
Everyone here is the choir...

Now convince the client that they don't need to track every single possible click of the user - as they experience their "journey" through the site...

...convince the client that all those experience designers effusing about that "emotional layer" they added to that user journey didn't really result in 30% more engagement with the brand - as evidenced by exactly that same user tracking - convince em XD isn't just mouthing a load of horse shit. I mean - why do all the folks in XD dress in black all the time anyway. Would someone run a focus group on that please?

Funny thing is - I don't even know if they are all full of shit or not. Maybe all this is all necessary - maybe not. I don't even know and I build this stuff for a living. Client seems happy so meh...

But yeah - these large JS bundles aint the cause of these large JS bundles... ahem - I mean these slow sites...
And the saddest thing is that this javascript is mainly used for a) tracking and b) useless UI features that stopped being impressive to anyone like 10 years ago (highjacking the scroll, parallax, sliders, etc.)
I had a quick look and it looks like a fairly vanilla ASP.Net MVC project?
Boost Your Inner Wealth Blueprint
As a former Capita person who has worked with a few clients in the public space, they absolutely didn't underestimate anything.

They wrote a contract full of wiggle room and loopholes that they could then feign ignorance over yet allowed them to constantly exaggerate and charge for the most minor of "misunderstandings" in implementation.
What exactly do you mean by low-level? Can you give a clear example?

.NET is an ecosystem of languages, runtimes, and tooling with Visual Studio being regarded by many as the best IDE. Add in the vast MS suite of Windows, Office, Azure, SQL Server, and the rest and you have one of the most productive frameworks to build anything for desktop, mobile, games, server backends, and even databases.

We moved over to .NET Core since v1.0 to consolidate on Linux/K8S and it's been a great experience. ASP.NET Core is also a very good framework for building webapps, SPAs and APIs that has more functionality in the box than pretty much anything else we've seen.

Nuget is turning into a solid package management system and there are great 3rd-party projects like IdentityServer for authentication, have you looked at that?
Jet fuel
Five DevOps Trends to Watch Out for in 2019
Also there is nothing special about websites. The same is true for programs and mobile apps.
You might not be high enough in a large company, but in smaller companies and startups, an employee-level pushback can go a long way.
But it’s also used in completely idiotic places. Want to display a 100% static blog post? With just thirteen megabytes of JS, you can break scrolling, zooming, screen readers, and many others.

Reminds me of emails and newsletters. Yes, they have many legitimate uses, but that doesn’t change the fact that a large part of them are just plain crap.

I feel like both sides of the debate are refusing to admit the other side might also have some valid points. Which admittably seems to be the theme in all of the internet.
The Money in Your Mind – Igor Ledochowski
Judging by the bundle sizes, the numbers aren't that bad if you consider the increasing of internet speed:

https://www.nngroup.com/articles/law-of-bandwidth/

Given that HTTP2 will be more and more available, the number of requests isn't a problem either. Global, fast CDN-s are thing for a while.

What would be worrying about client side JS is needless use of heavy frameworks, like Angular, CPU hogging tracking scripts or lame ads, dark UX marketing widgets.
The MoD paid all that money and doesn't even get ownership of the code!
I'm a web developer who avoids this sad trend wherever possible. I see two reasons for this:
1) the development experience for things like React is so 'smooth' that many developers use it even when it's not necessary at all (I'm referring to things like hot-reloading and custom components which are more complicated to set up with pre-processors)
2) some animations and advanced interactivity have become expected of us, but instead of tacking it on later, which makes the code objectively less clean, they build everything in JS, making it perform like shit and leading to things like the infamous gray bars placeholder.

But it can be done right. dev.to is a great example of an interactive web application with all the bells and whistles, yet it still performs better than most static sites.
Keeping your name and location anonymous doesn't matter. Once a company obtains a family member's DNA information through any other source, they will see a familial correlation, use other records to realize that family member has a brother/sister/etc and might now attribute that once-anonymous DNA record to you.

That's the scary thing about these companies: you might never even use the service, but once a relative does, the company now has information about you.
Can someone who actually makes websites explain why this has happened?

The cause is split pretty evenly between web developers who don't care about what they build enough to learn how to do it well, and companies who employ them letting them do that rather than pushing them to improve, and client's who don't understand what they've bought well enough to complain.

Everything is like that though. It's not limited to websites. Everything has problems, and it's always someone's fault. Developers tend to notice websites because we use them a lot and (some of us) think it's just laziness on the part of the website dev, but if you were an electrician you'd see problems with powertools, or a nurse you'd see issues with drug companies, and so on. The world is imperfect.
Tangential, but when even avowedly privacy-conscious entities like Signal cannot see fit to serve a simple web-page without realtime reporting all user access to assorted third parties (including divisions of the Google and Microsoft empires), it actually saps my hope more thoroughly than the unsurprising idiocy an malevolence of some Aussie politicians.
Microsoft’s Hummingbird app uses AI to deliver a personalized news feed
Within the scope of my comment I was using a far narrower definition of internal repression than you are. That being said, I don't disagree with you to any significant degree, although I would not count obesity or tropical disease. The only aspect in which the U.S. is somewhat exceptional (in the good sense) still is its legal support for free speech, which is still arguably the best in the world.

I would also note that even including all of the damning things you list, the U.S. on average falls behind most rich democracies in the world, but is still far ahead of most other states, except in the incarceration rate [1]. Rich democracies are an outlier.

[1] I'm not sure that's quite true any more if you count in all the Chinese internment camps and other non-disclosed facilities - the U.S. never had secret prisons at scale, other states do.
I feel like there is some happy medium. For instance, biasing toward declarative documents as much as possible (HTML and CSS DOM) and perhaps fetching and compiling/linking only needed JS functions with intelligent asset pipelines. I built production web sites with Play Framework's asset pipeline that netted a single first party JS file and no external JS. As could be expected via minimalism it felt faster than almost every site on the internet. Even with third party JS you could cache, compile/perform weak linkage step, and ship a single JS file. No site necessarily needs more than three docs (HTML, CSS, JS) for the first hit plus whatever images, sprites, and fonts load async.
It's better than nothing, but please note that a lot of these are unfortunately inaccurate.

Eg. even sizeable cities such as Wrocław are referred to as "towns"... Poznań is supposedly located in the Silesia region... Sopot is referred to alternately by its Polish and German name (Zopott), and the German name is given as the primary one for Frombork (misspelled "Fronbork"), while the Motława river is named "Mottlau" exclusively for some reason, etc.
Hmm, masses of concrete and falling apart houses are still in most cities, even today. Even some bigger towns.
They could even use WSL to put Linux on top of the NT kernel. It'd be called Microsoft GNU/Windows.

Or they could ditch the GNU part and go for a non-GNU libc and userland like the article suggests. That wouldn't save nearly as much money as the article speculates because the Windows userland is humongous - NT is a small part of the whole, much like the Linux kernel is a vanishingly small part of the distributed effort of building desktop Linux distros.
Pardon this low quality comment but I must “hehehe”.
Imo, the real problem is that most people believe what you're saying is true, but if we assume that JS itself is not the problem, and that finding the right patterns for building fast websites with JavaScript, the next question becomes: who do we look to to learn the right patterns from.

For most people, the intuitive thing is to look to successful companies: Google, Facebook, etc. The problem here is two fold: (1) operating at scale often has requirements that supercede making individual pages fast for individual visitors and (2) massive market dominance/semi-monopolies/vendor-lock-ins means these companies don't really need to compete on perf. See Facebook.com/gmail.com as lovely examples of some of the worst performance on the web.

You're right that one can make a webpage fast with correctly implemented js, but I disagree that people can make webpages fast en masse with correctly implemented js; dissuading the use of JS is much more likely to have a positive effect than expecting people to somehow spontaneously learn how to write good js.
What Are Smart Documents and Why They Will Make Your Work Life Easy
Isn't the tag manager and analytics library likely to be cached, thus using zero bytes on average versus the non-zero number of bytes for this library?
The problem with a heavy bundle isn't just delivery it's parsing and execution the bundle aswell.
What is stopping the labs that do my company mandated health checks to sell my DNA?

What is stopping the government from collecting DNA at birth? yes.. it's not a law.. yet.
Authors are free to alienate their audience the way they please :)
Figma launched in 2015 so they are relatively new. I don't know what their marketshare is but they definitely have 'mindhshare' among many designers (if that counts for something).

If you do an online search for "Sketch vs Figma" (or on YouTube) you'll find dozens of comparisons. Figma is browser-based which is a turn-off for many people (including me). However, sceptical reviewers have been won over by its features and the UI. So in the design tools space, they are definitely one to keep an eye on.
Similarly, Stroud's "Engineering Mathematics" takes you right from addition all the way up to Fourier transforms... a fantatsic book.
Bing Karten – Digital Marketing Specialists
> Also, JS is cached. First time will be slow, others, not so much

This is a very weak argument.

* many 3rd party resources are not cacheable or may have bad policies
* caches may be more often cold then you expect. most apps still cache large combined blobs, which will invalidate with each release.
* pure JS size has still it's impact on performance
* caching won't magically cut all network roundtrips which you need due to architectural reasons
I have no familiarity with Java but I'm not surprised you are more productive with Python, Flask and Django (although you are conflating languages and frameworks to some extent here) versus C# and .NET Core's way of building API's and web applications.

I have been developing in C# for years and I still prefer Python's simplicity over C# and .NET. C# and .NET just seems to have too many concepts, indirection, and 'enterpriseyness' for my liking. This is alleviated by things like LINQ, but still an issue for me.
Sometime back I proposed Agile methodology for Govt officials. They laughed at it :(
Brave browser follows Edge’s lead and switches to Chromium code base
HECK and Robot Floor Cleaner (1957)