News for hackers. Stuff that matters.
Re:Done Answering Questions Stack Overflow by ravenstine on Tuesday February 16, 2021 @11:11PM (#26162593)
I agree with all of that, but the worst part to me(which I guess relates to your point about the accepted answers) is that there's no path to deprecating old answer and old questions.

I've been lambasted here in the past for saying this, but I'll say it again now and see if I get a different response; it's no longer helpful to search for "javascript" related questions and get mostly answers for jQuery. These days I'm able to solve a lot of problems just reading MDN, but sometimes I click on a Stack Overflow article and it turns out to be 12 answers that are all jQuery-specific even when the question itself doesn't call for it. jQuery isn't bad, but the world has changed around it and we can't keep pretending like everyone is using it for the same reasons we did back in 2011.

This not only does new developers a general disservice, but it can do a disservice to projects that have less-than-average momentum. For instance, I use Ember JS every day, and it's a framework that has really changed a lot since its inception, but you'd never know it if you looked up questions for it on Stack Overflow. The Ember questions on there are so woefully outdated that I believe it gives potential new users the complete wrong impression of it. There are outdated React questions on there as well, but at least there's enough inertia behind React that new activity helps overcome this to a degree. On the other hand, people almost certainly have given up on Ember because none of the Stack Overflow answers work at all. Sure, we could all submit updated answers, but they'll be below the fold and they will never be reselected as the accepted answer. There are other reasons why Ember has been in decline, but I do blame the mechanics of SO as a big detractor.

Preventing duplicate questions is fine, the overzealousness not withstanding, but if there's no mechanism to correct existing information as time goes on in a meaningful way, the only result can be rot.

Re:Done Answering Questions Stack Overflow by jakelazaroff on Tuesday February 16, 2021 @11:26PM (#26162686)
> it's no longer helpful to search for "javascript" related questions and get mostly answers for jQuery

jQuery is used on 83% of all websites; React is used on 4% [1]. You’re right that people are probably using it differently than they were a decade ago, but even in 2021 your average jQuery question is probably useful to many more people than your average React one.

[1] https://css-tricks.com/how-the-web-is-really-built/

Re:Done Answering Questions Stack Overflow by gregmac on Wednesday February 17, 2021 @12:11AM (#26162959)
You're missing the point I believe the OP was trying to make: ten+ years ago, jQuery was often by far the easiest way to implement most things. One line of jQuery could replace a dozen lines of plain JavaScript, even ignoring all the nonsense you'd have to learn about cross-browser support.

Today, so many things are possible and easier with plain JavaScript and/or CSS.

I'd even go further and say there's lots of new sites using jQuery unnecessarily because the accepted, highly-upvoted, but 10-year-old SO answer said that was the way.

Re:Done Answering Questions Stack Overflow by ballenf on Wednesday February 17, 2021 @12:48PM (#26169208)
To summarize: jquery used to be best answer to many JS questions. And now it never is unless the question specifies its use.

No one should be recommending the introduction of jquery (to solve some discrete issue) unless it’s already part of the stack.

But that’s exactly the opposite of how the current state of JS answers appears.

Re:Done Answering Questions Stack Overflow by lolinder on Wednesday February 17, 2021 @12:17AM (#26162995)
Stack Overflow's developer survey found that in 2020 43% of web developers were using jQuery and 36% were using React [0]. Still biased in favor of jQuery but not nearly as much as you say.

[0] https://insights.stackoverflow.com/survey/2020#most-popular-...

Re:Done Answering Questions Stack Overflow by jakelazaroff on Wednesday February 17, 2021 @01:54AM (#26163488)
Based on nothing other than intuition, I assume the Stack Overflow audience still at least slightly selects for React developers over jQuery developers, compared to the general public.

Of course, that doesn't really matter — we're talking about Stack Overflow users, and you're right that this is a way better source of data on what Stack Overflow users care about. Not sure why I didn't think to check their developer survey.

Re:Done Answering Questions Stack Overflow by mastazi on Tuesday February 16, 2021 @11:41PM (#26162772)
> jQuery is used on 83% of all websites;

There are a lot of websites I made in the past and they are still online and many of them use jQuery, but I don't need to check Stackoverflow in relation to those websites, because I'm no longer working on them (and in most cases no one else does either, they just happily keep running unmodified). All of those are part of that 83% that you mention.

Stackoverflow is a Q&A websites for developers so IMHO it should focus on tech that is currently in use on actively developed systems.

Re:Done Answering Questions Stack Overflow by jakelazaroff on Tuesday February 16, 2021 @11:49PM (#26162827)
Even if only 10% of jQuery websites are maintained, and every single React website is, there are still almost twice as many actively developed websites using jQuery than React.
Re:Done Answering Questions Stack Overflow by adjkant on Tuesday February 16, 2021 @11:56PM (#26162872)
See my comment, and actually with that 10% number it doesn't hold true with only 50% of the logic applied.

50/10 vs 4*(unmaintained rate) + undercounting (possibly a large majority, possibly small) is probably React winning out

Re:Done Answering Questions Stack Overflow by mastazi on Tuesday February 16, 2021 @11:54PM (#26162862)
That's a fair point, I didn't think about it that way.
Re:Done Answering Questions Stack Overflow by cosmotic on Wednesday February 17, 2021 @12:21AM (#26163012)
I still use jquery actively. Without substantial work and complexity, a typical react site's initial page load still requires an enormous javascript chunk for anything to show on the screen. When I notice a site I'm using is slow, unresponsive (interactivity wise), or buggy, more often than not the react dev extension is lit up. React (and ecosystem) may represent the future but they still have a lot of growing pains to overcome before totally replacing jquery.
Re:Done Answering Questions Stack Overflow by mastazi on Wednesday February 17, 2021 @12:54AM (#26163192)
I also use jQuery from time to time and I don't have anything against it, my point was not related to jQuery.

PS from your comment it sounds like you could be interested in Vue, specifically using Vue standalone without npm/webpack e.g. https://v3.vuejs.org/guide/installation.html#cdn

Re:Done Answering Questions Stack Overflow by mmcnl on Wednesday February 17, 2021 @04:21PM (#26171954)
This doesn't make any sense. jQuery is a library for DOM manipulation. React is a view layer framework. They are totally different solutions for different problems. If jQuery suits your needs, you probably don't need jQuery at all because vanilla JS is quite capable these days.
Re:Done Answering Questions Stack Overflow by cosmotic on Wednesday February 17, 2021 @11:24PM (#26175774)
They are both used to add client-side interactivity. I agree vanilla JS is often a capable alternative. jQuery offers a lot of convenience though.
Re:Done Answering Questions Stack Overflow by adjkant on Tuesday February 16, 2021 @11:54PM (#26162863)
That 83% is very shaky at best.

First, number of websites != number of platforms. If you go to the source of the number, they even point out as much:

> WordPress, which is used in more than 30% of sites, includes jQuery by default.

So right off the bat, you're looking at 50% or so, maybe plus a few for people who actually make a point to write jQuery + for wordpress specifically.

Secondly, that study has detection issues [0] that seem to not pick up a good deal of bundlers/etc, which makes it really hard to say how many of React/Vue sites are missed.

Thirdly, jQuery being used as a dependency of a library will still count it in that 83%. They show a few combination options specifically, and show it's at least 1.7% [1]. With others, say 2.5% in total. Think about how many bundlers hide React/Vue and how many common dependencies could use jQuery, and you're probably much higher.

Given all that, I'd bet that number is closer to 17% than 83%, though I'd wager around 33%.

Even with that 33% being jQuery without a framework or not being wordpress, you have to remember this is published. How many of those have had code significantly changed in the past 5 years? This is what's relevant in this context. All of this long winded nuance to say that I don't think "your average jQuery question is probably useful to many more people than your average React one" holds up, at least not like you might think that cited number shows. That's not to say it's irrelevant, just less relevant.

[0] https://github.com/AliasIO/wappalyzer/issues/2450

[1] https://almanac.httparchive.org/en/2020/javascript#framework...

Re:Done Answering Questions Stack Overflow by jakelazaroff on Wednesday February 17, 2021 @12:16AM (#26162990)
Agreed that it's all very directional, but I think you're discounting some of it a little too readily. Even if you're just using jQuery because it's a transitive dependency or bundled by default, you might still have issues that lead you to search Stack Overflow for help.

The broader point is, we should be cognizant of our selection bias here. SPA frameworks are overrepresented on HN because we tend to be programmers building applications in the tech industry. But there are a ton of people who don't consider themselves "in tech" that still need to make a portfolio for their photos/figure out a WordPress plugin for their e-commerce site/etc.

Re:Done Answering Questions Stack Overflow by slaymaker1907 on Tuesday February 16, 2021 @11:52PM (#26162847)
This seems unreliable since it weights a website maintained by a single developer in their spare time the same as a website with a dedicated team of devs working full time.
Re:Done Answering Questions Stack Overflow by marcinzm on Tuesday February 16, 2021 @11:57PM (#26162874)
Yeah, Stack Overflow is for humans and not for websites. A billion websites maintained by 1 person don't count more than 1 website maintained by 1 person. The question is how many web developers nowadays use these technologies during their day to day activities.
Re:Done Answering Questions Stack Overflow by PurpleFoxy on Wednesday February 17, 2021 @12:01AM (#26162901)
A somewhat accurate test would be to look at job listings. Last time I checked. Every front end job listing asked for react/vue/angular skills.
Re:Done Answering Questions Stack Overflow by nitwit005 on Tuesday February 16, 2021 @11:58PM (#26162879)
That's probably more of a measurement of popular frameworks or libraries pulling in jquery, rather than people wanting to use it for development. Your link suggests a third of the web is wordpress, for example, but wordpress seems to want to eventually remove it as a dependency.
Re:Done Answering Questions Stack Overflow by thehappypm on Wednesday February 17, 2021 @12:00AM (#26162896)
That 4% constitutes many large shops.
Re:Done Answering Questions Stack Overflow by duxup on Tuesday February 16, 2021 @11:59PM (#26162891)
Even React answers of the past are often class component based... and for my taste the react answers are either slapshot / they work but aren't best practices, or if they are good they rarely explain why you would do A instead of B.