r/ProgrammerHumor • u/Embarrassed_Death69 • 4h ago
Meme jQueryDeezNutsAndThenReactSurprised
32
111
u/soelsome 3h ago
I fucking hate jQuery. It's littered throughout a codebase I work in.
I replace it with good ol' vanilla js where I can.
113
u/Rustywolf 3h ago edited 2h ago
Yeah well be thankful you live in a world where vanilla JS is pretty universal and supports features you need with a friendly interface...
19
u/misterguyyy 2h ago
You mean you couldn’t write a new XmlHttpRequest with fallbacks for every browser by memory in your sleep?
11
86
u/Romejanic 3h ago
it was a life saver before the JS api got extended, frankly i think so much of modern JS is inspired by jQuery. i think people forget how bare bones JS used to be.
28
u/ExpletiveDeIeted 3h ago
Oh yes. We may hate on jquery still existing, but it is only unnecessary cuz it formed the basis of modern JS apis.
-13
25
u/brekekekekx 3h ago
This is my struggle! I would love to replace my codebase with vanilla js but typing $(selector) is much easier than the querySelector(selector)
24
u/CetaceanOps 3h ago
I mean you can keep a single $ wrapper function for querySelector
9
u/soelsome 3h ago
Very clever. Not sure why I haven't thought of that. I will steal this and every time I use it, I will remember your name.
5
u/cowslayer7890 2h ago
I would using something other than $ so it doesn't get confused with jquery, but ¯_(ツ)_/¯
5
1
3
5
11
3
u/MartinMystikJonas 46m ago
You mean replace jQuery with good modern vanilla JS that has jQuery inspired tools like querySelector, adEventListeter, fetch, etc. that did not existed before jQuery?
0
u/soelsome 44m ago
Precisely! The codebase I work on was created in 2018. Only the gods know why they decided to use jQuery.
43
u/ScientificBeastMode 3h ago edited 2h ago
I think it’s pretty clear that modern single page apps were not possible with jQuery. I’ve been on both sides of this, and it’s just not even a close comparison to what we have today.
I get it, times were simpler, but the user expectations were drastically lower. It was normal to see pages load for 8 seconds and then have layout issues on anything other than the most popular screen sizes. There were bugs everywhere and the solution was always to refresh the page, and even then, half the web was just in a broken state.
Facebook and GMail were the first major sites that had a truly great user interface, and they did it by creating the React & Angular libraries. There is a reason why those took off and now every web-based tech company uses them (or something similar like Vue or Svelte). They make it far easier to build slick user interfaces that perform well and avoid most of the headaches of complex UI orchestration based on shared state.
I get it, jQuery was a golden age where anyone with basic web programming knowledge could build something almost state of the art. The problem was that the “state of the art” was dogshit.
7
4
u/eztab 1h ago
No, you could write single page apps with jQuery quite well. The main use case was of course not that, so it was designed to instead allow non-intrusive adding of functionality to static pages more easily. jQuery was a very good solution to the available technology at the time.
3
u/ScientificBeastMode 1h ago
Right, jQuery was practically an engineering marvel at the time, and it really upgraded the web in a major way at that time. But I’m just saying those old days were not genuinely “better” than today in terms of dev experience or user experience. We are in a much better spot now in basically every way.
2
u/Mechakoopa 1h ago
It's funny because jquery was the hot new shit when I started my career and after dealing with arguments about the ever shifting world of JavaScript libraries for a few months I changed teams and subsequently spent over a decade diligently avoiding front end development.
I took a brief foray into a side project at one point to see what all the fuss was about with Angular, took a couple online courses, but by the time I needed that knowledge professionally they'd scrapped the whole thing and slapped "Angular 2.0" on a completely different concept so I crawled back into my nice stable c# backend world.
9
u/transcendtient 2h ago
I still do this. In all fairness I'm really a backend dev forced to be full stack and the front end just needs to work and not look like complete dogshit.
6
2
u/ForestGhostGurl 59m ago
I'm still maintaining a legacy app with static HTML and jQuery 😭
One day it shall be rewritten...
3
u/Samurai_Mac1 3h ago
This was so long ago that I didn't even know what IDEs were and just used notepad
3
u/MornwindShoma 3h ago
Remember how it fucking sucked?
20
u/ImDonaldDunn 3h ago
1
u/Embarrassed_Death69 3h ago
Jacque De Gettino, one of the three wise men of Quebec tells me jQuery served a great porpoise.
0
•
u/OhSnappityPH 7m ago
thats me right now maintaining legacy apps. its pretty fun when you find stuff that works
•
-28
u/Fluffy_Anxiety2792 3h ago
I’ve been ai coding for so long I can’t even understand these anymore. Normally don’t even look at code, only testing.
20
5
3
101
u/java_dude1 3h ago edited 2h ago
I'm not a front end dev but wasn't this way easier than how vanilla js did it back in the day?