Live data from Hacker News

Gov.uk drops jQuery from their front end

web.dev

381–390 of 458 posts

Re: Gov.uk drops jQuery from their front end

#381

When I first started programming I was pretty lucky to get a job at a games company. My first lead was a veteran who had shipped a lot of AAA titles and he loved his war stories. He was personally interested in performance and he would often cite hardware timings for specific cpu instructions. One story he told a couple of times was about some grey beard who was before his time. The grey beard was once a legend in th…

I'm not sure it was ever a particularly reliable approach to master instruction timings as these timings are a best effort schedule guarantee outside of a hard real-time system. Unless you profiled each instruction cycle timing over every microcode update to your processor, maybe, but I'm doubtful this was ever a sound approach.

It doesn't sound like grey beard knew what he was actually doing, but more relying on his years of experience and good fortune that has kept him with a job up until then.

Re: Gov.uk drops jQuery from their front end

#382
post #379

Aside from jQuery, I'm just amazed at how good the gov.uk is. They're comprehensive and accessible. Isn't this the pinnacle of government websites? I only wish that our government site (Japan) is half as good.

Does Japan still require Internet Explorer? It's a very weird country webdev-wise.

Re: Gov.uk drops jQuery from their front end

#383
post #379

Aside from jQuery, I'm just amazed at how good the gov.uk is. They're comprehensive and accessible. Isn't this the pinnacle of government websites? I only wish that our government site (Japan) is half as good.

Its infrastructure is also largely public: https://github.com/alphagov/govuk-puppet

Re: Gov.uk drops jQuery from their front end

#384
post #284
post #241

Earlier quoted context omitted.

Amusingly, I always joke that I'm fluent in jQuery, but no absolutely no javascript. As a mostly backend go/python/non-javascript developer that has always held true. It is just a tool in the belt for an engineer. Can you use jQuery in 2022 or later to solve really amazing problems that impact user experience? You sure can! Would you be better off to use a modern javascript variant and stuff like react instead? You a…

Why react though? Just modern JavaScript (and typescript) is a great replacement for jQuery. The react part is just for when you need to build something that needs architecture.

I primarily did this out of anger and used https://datatables.net to build web based data apps. That’s a really mature and extensible table widget and it would be a shame to not use it as it’s been out years, but in general I know react is how many good modern web apps are written so I’d start there.

Re: Gov.uk drops jQuery from their front end

#385
post #241

Earlier quoted context omitted.

Amusingly, I always joke that I'm fluent in jQuery, but no absolutely no javascript. As a mostly backend go/python/non-javascript developer that has always held true. It is just a tool in the belt for an engineer. Can you use jQuery in 2022 or later to solve really amazing problems that impact user experience? You sure can! Would you be better off to use a modern javascript variant and stuff like react instead? You a…

>Would you be better off to use a modern javascript variant and stuff like react instead? You also absolutely would. Why?

Because jQuery was written to paper over limitations in ancient browsers that no longer exist, and modern (es6+) vanilla js is actually quite good. One of the primary reasons jQuery was invented is not relevant today. It’s still good software, but I’d say the same about the Perl lwp library yet you don’t see people using it.

Re: Gov.uk drops jQuery from their front end

#386
post #285
post #229

Earlier quoted context omitted.

you could be using it already w/jquery though and if you just switched to the native selector it would stop working everywhere but safari. "#some_combo:has(option:selected[value=..]) + .." seems like a reasonable way to conditionally target something to me, is it terribly worse than some other way?

> is it terribly worse than some other way? Yeah, it's fragile and will easily lead to bugs when someone changes the markup without realizing it's going to break some crazy selector in another part of the code. It would make a lot more sense to just add a class to the element you're trying to select.

That selector does not seem fragile at all. It selects any anchor elements with gifs in them. A lot of the time we can't change the markup, either.

Re: Gov.uk drops jQuery from their front end

#387
post #106

I still use jQuery for frontend JavaScript when I can. It's so much more efficient than native JavaScript. I can't imagine anyone prefers to write document.getElementById('element').style.display = 'none' rather than $('#element').hide();

Does your IDE autocomplete the jQuery code though? I'd imagine it wouldn't. But it would for the native code.

It sure does.

But I still prefer vanilla or anything but jq

Re: Gov.uk drops jQuery from their front end

#388

When I first started programming I was pretty lucky to get a job at a games company. My first lead was a veteran who had shipped a lot of AAA titles and he loved his war stories. He was personally interested in performance and he would often cite hardware timings for specific cpu instructions. One story he told a couple of times was about some grey beard who was before his time. The grey beard was once a legend in th…

Why should we have to uproot everything we know for the flavor of the month??? No other industry does this! You can work the same job for 45 years in any other role

Re: Gov.uk drops jQuery from their front end

#390
post #376
post #340

Earlier quoted context omitted.

IMHO this analogy doesn't really click, on multiple levels. Any old timer who uses jQuery surely is also aware of querySelectorAll and friends. There's even an entire website dedicated to catering to exactly that transition[0]. I don't think anyone defending jQuery is doing so out of a sense of hubris towards outdated knowledge, but rather because it ironically is more lightweight than a lot of the modern SPA craze,…

I think you're trying to draw too much of an analogy here. The point is just that advertising jQuery expertise on your resume today is evidence (though not especially strong evidence) that you might be someone whose skills are of diminishing relevance. Myself, I'm not convinced there's much harm in using jQuery, it's not exactly heavyweight. But if in fact fewer and fewer pages include it, then your expertise is rele…

I am not sure that the story has anything to do with the situation of jQuery today, because as I can see in your story there was a guy whose skills were of diminishing relevance, but surrounded by people whose skills in that area were never a thing in the first place, what I can draw from your story is that it's useless to cultivate an expertise in a niche field because it will be irrelevant in a few years?
Post reply on HN