Live data from Hacker News

Gov.uk drops jQuery from their front end

web.dev

411–420 of 458 posts

Re: Gov.uk drops jQuery from their front end

#411

Earlier quoted context omitted.

I think it's just for brevity, rather than because a helper is needed . OP listed the entire source code of their module in their comment.

Brevity is cool, but that's kind of like naming all your variables one letter chars for brevity. This is something every web dev will instantly know what it does: document.querySelectorAll('#rabbit .green').forEach(tag => { }) Whereas this is something nobody knows what the fuck it is because it's completely non-standard. for (const rabbit of dqsA('#rabbits .green')) { } And get what, 10 characters less in one row? B…

It’s no more ‘non-standard’ than jQuery’s `$`.

Most IDEs will allow you to see what dqsA aliases by mousing over. I don’t really see a problem with it.

It also looks like the kind of thing a pre-commit hook could trivially expand if you’re working with other people who might find it in some way unacceptable.

Re: Gov.uk drops jQuery from their front end

#413
post #239

Earlier quoted context omitted.

I think you're greatly exaggerating the death of jQuery > old trick's won't work > writing is on the wall jQuery still works and is used in an crazy amount of websites. It's not going away soon. The biggest downside is the extra network request, but it's probably cached in 99% of browsers, so all that's left is some extra CPU time. You're also exaggerating the claims of jQuery defenders. No one here is arguing that t…

Chrome started partitioning the cache a couple years ago to mitigate timing attacks, so there's no network savings anymore when a bunch of sites all link to the same jQuery cdn entry.

Really proves the point that knowledge will atrophy. As a dev you need to invest in evergreen skills as well as trivia.

Re: Gov.uk drops jQuery from their front end

#414
post #110

Earlier quoted context omitted.

> design a language which would simply be "better JavaScript" - clean, modern and elegant yet have no fundamental differences JS' problem is that it is fundamentally not "clean, modern and elegant". It was designed in a couple of days. And all the greatness that's added to it nowadays is done in a much better design process than at it's inception, yet some choices made at it's inception can never be reversed. I've wr…

AFAIK Elm can not be considered "a better JavaScript" because it not only is fundamentally different, it also is not fully self-sufficient - in many cases you have to resort to JavaScript pieces while engineering an Elm app.

Same C programmers sometimes use assembly. The abstraction is leaky.

I agree it's not a clean superset like TS is, but for the app I wrote I did not have to use any JS except in instantiating the app (3 lines iirc).

Re: Gov.uk drops jQuery from their front end

#415

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…

> But to me, they are like the old grey beard who didn't update his knowledge as the times changed. Maybe it's just me but with all the rampant age discrimination nowadays in tech, I really don't like to see the continued propagation of this stereotype. All sorts of people of all ages are unwilling or unable to update their knowledge of new tech, there is no reason to link this characteristic to someones advanced age…

Also, with the kind of smug tone op has posted his comment, I'm reasonably sure he doesn't understand that basic techniques fir x86 optimization have actually remain largely unchanged and what worked then also works reasonably well now, despite compiler improvements

Re: Gov.uk drops jQuery from their front end

#416

Earlier quoted context omitted.

It's 2022. Men can get pregnant and women can have a beard. Greybeards is an inclusive term and it's a well known term.

I hope your username is accurate.

fighting fire with their own fire

Re: Gov.uk drops jQuery from their front end

#417
post #306

Earlier quoted context omitted.

> Add enough helper functions are you're at jQuery anyway. I really hate these exaggerations. jQuery is, last I checked, over 200k unminified. Anyone writing enough helper functions to get to a fraction of that is already a pathological case.

Browsing the source of jQuery and I don't find it bloated but I find a lot of knowledge in there that a naive user the DOM API would most likely know about. It's kind of like how you can comparing languages using simple example code isn't relevant because proper code with full error handling and edge case handling can be very different from a naive example.

That's not the point.

The point is that this is a strawman. "Enough helper functions" to get to jQuery is 288580 bytes. A quarter of that, or even a tenth of that, is already a pathological case and way beyond almost every case of "jQuery substitution" that would happen in practice.

Re: Gov.uk drops jQuery from their front end

#418

Earlier quoted context omitted.

I sympathize with older devs, my dad is an older software dev. But you kind of do have to be old in order to have outdated knowledge: nobody young is going to learn assembly tricks which worked on MIPS and other past architectures. Older devs and companies not constantly learning new things and updating to best practices is a real phenomenon. On the other hand, anecdotally most older developers actually do keep up to…

anecdotally most older developers actually do keep up to date with the latest best practices. As an old guy I would find it very hard to keep up to date with the "latest best practices" because I tend to think of "latest" and "best practices" as antithetical. JQuery is a good example: I never invested time in it since I figured it would pass. I could smell it from the way kids were raving about it. So this type of ar…

IMHO there was definitely a period when jQuery solved a whole host of problems for you and allowed you to write client side code much faster. If you weren't using jQuery or an equivalent you were kneecapping yourself unnecessarily.

Re: Gov.uk drops jQuery from their front end

#419
post #99
post #47

Earlier quoted context omitted.

Hmm, I would agree that you can do 95%+ of stuff jQuery used to be used for in vanilla js or html/css in a nicer way but animated collapsible divs still require a stupid amount of js to achieve.

Animated collapsible div can be done with 0 line of JS. https://code-boxx.com/expand-collapse-div-css-only/

Uhh, did you check out how that actually functions? It looks like garbage.

Re: Gov.uk drops jQuery from their front end

#420
post #356

Earlier quoted context omitted.

The meaning of "greybeard" have moved from being literally, to current be figuratively. It doesn't mean that the person is A) old, B) man C) have a beard and D) that the beard is grey. It simply means someone experienced/being at something for a long time. The greybeards at a company can be all women of the age 26, but if they been with the company for 5 years when the company got started 5 years ago, they are the gr…

"veteran", from latin "vetus" meaning "old" :)

Weirdly enough, we don't speak latin no more, and the meaning of words changes over time :)
Post reply on HN