10 ms·
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 love
by reggieband 4y ago
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 the company, often helicoptered into projects at the last minute to help them squeeze out the last bit of performance. His secret was he had a mental library of assembly language tricks applicable to the hardware of his day. But every few years his tricks were less and less relevant as hardware changed and compilers advanced. One day the grey beard was helicoptered into my leads project and everyone expected him to get them some gains. However, this was new hardware and none of his old tricks worked.
I think of this story whenever I see jQuery popup on Hacker News. There is always a strong contingent of devs who swear by this library. But to me, they are like the old grey beard who didn't update his knowledge as the times changed. At one time jQuery allowed them to be the hero and "Get Things Done" faster than their competition. But times have changed.
Argue with me if you must but take stories like this one for what they are worth. The writing is on the wall for jQuery. I was writing websites before jQuery existed, during the reign of jQuery and still today. If some candidate mentioned proficiency with jQuery during an interview I would be polite but internally I would note that the person might be out of touch. Not a red flag, but a yellow flag that I would follow up on. Nothing worse than bringing on a guy who claims to be senior/experienced and it turn out his old tricks won't work because they are no longer appropriate.
- bezospen15 4y agoWhy 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
- bern4444 4y agoI think the parent comment is referencing how much is built into JS natively today that people used to use jquery to do. Jquery is also a library not unlike any other a la react, redux, observables etc. Jquery was successful but now there are better more powerful tools. Lots of jquery can now be done natively or with better tools.
- lesgobrandon 4y ago
- simion314 4y agoI wish JS would get all the nice jQuery features, like all the css selectors jQuery has, like a nice feature would be when you retive an HtmlElementCollection to be able to apply some transformation to all elements without having to write a for, or make use Array.from and then use forEach. But I agree I would not use jQuery in new project and when possible I would replace jQuery in existing code too.
- Someone1234 4y agoThat's what everyone keeps missing. Can vanilla do what jQuery can? Of course, and that has always been true. What jQuery (and similar) offer is quality of life stuff, vanilla has never even tried to offer. This is still an ecosystem without a standard library and with no consistent design style/layout. It is janky and bad. It being "less bad than it used to be" isn't the shiny endorsement that everyone thinks it is.
- nikanj 4y agojQuery is implemented in vanilla JS, thus logically all of it’s features can be done vanilla JS
- deleted 4y ago[deleted]
- 0xFF0123 4y agoThat's a bit like saying everyone should code in assembly. The argument isn't whether it's possible, but whether it's easier / more efficient.
- nikanj 4y agoI guess I should have added more meat to my comment: It’s frustrating when people reject a good tool like jQuery, with the argument that the same functionality can be achieved with just vanilla JS.
- 4y ago
- rhapsodic 4y ago
- linkdd 4y agowhat's so wrong about sprinkling some jquery on a static website (generated with hugo or jekyll)? On https://kubirds.com https://kubirds.com I use: jQuery appear: https://plugins.jquery.com/appear/ https://plugins.jquery.com/appear/ jQuery fancybox: https://fancyapps.com/docs/ui/fancybox/ https://fancyapps.com/docs/ui/fancybox/ Do not put jQuery to the trash yet, it still have a long life ahead.
- ianleeclark 4y ago> what's so wrong about sprinkling some jquery on a static website You're talking past one another. He's speaking in the context of AAA games, and the equivalent of that in the webdev world is a highly interactive application.
- bcrosby95 4y agoI don't see anyone saying to use jQuery for highly interactive applications. If that is the comparison, its not talking past eachother, the original comment is a strawman.
- ianleeclark 4y ago> I don't see anyone saying to use jQuery for highly interactive applications. I don't know what to tell you. The first sentence in my comment was a quote and the rest of the comment was responding to say how that quote was misunderstanding the OP. I never said anyone specifically said to do that, but that, in the metaphor that the OP made, a static website isn't an accurate comparison to a AAA game.
- httpsterio 4y agoIt's pretty expensive to ship and compute. Wikipedia for example dropped jquery from their navigation and it resulted in a ~27% difference in battery usage IIRC.
- influx 4y agoI checked out kubirds, and even though I'm probably somewhat in your target demographic, I noticed that I couldn't discover what kubirds does without watching a video. Even scrolling down, and through the website, I didn't really understand it, until you compared to Nagios, which I am familiar with. Hope you don't mind a little unsolicited feedback. The website does look super clean! I would love to read a paragraph of your elevator pitch the moment I lay my eyes on the site though. Cheers.
- TOMDM 4y agoI agree with your sentiment in total, but I'd also add, for every out of touch programmer still swearing by JQuery, there are 5 recruiters that demand proficiency in it that other programmers feel they need to appease. I think the most diplomatic way of distinguishing the two types of programmers is just to ask why they like JQuery. "Because it helps me ship faster" may be a bit out of touch. "Because it's a required competency in working with some code bases" are probably the latter.
- robalfonso 4y agoAs a counterpoint, I had a similar conversation with a report of mine about jQuery. He said it was not necessary and you could just use vanilla js. I said while yes that's true as a dev if I told you I needed you to implement a new payment provider for billing would you tightly and directly align with who we used or abstract it away via some wrapper so that if we ever had to change it wouldn't be difficult? Of course everyone builds abstractions so you aren't stuck with a single provider because it's crazy not to. I see jQuery as that abstraction. At the end of the day each browser is an api implementer and while they've come so far, that doesn't mean the situation is stable and we'll never see implementation fracture again. It of course doesn't have to be jQuery but any direct implementation of JS seems to have that risk which is easily mitigated by wrapping the basic functionality. I don't know why you wouldn't choose to do it.
- Gare 4y agoWhat? Web APIs are one of the most stable APIs in existence. "Don't break the web" is taken very seriously.
- damon_c 4y agoThe context for this belief has only existed for about 10 years now.
- plorkyeran 4y agoThe phrase "Don't break the web" is a bit newer, but it's basically the sentiment that lead to WHATWG forming 18 years ago, and one of the big defining goals of HTML5 was to set a foundation for expanding the web platform in a backwards-compatible way. HTML5 has been out for about as long as the invention of the web to HTML5.
- 8ytecoder 4y agoMore like half of that. I did web development in 2012. We couldn't have done it without jQuery.
- 4y ago
- samwillis 4y agoWhile I agree to some extent, jQuery is so prolific online [0] there will always be jobs for those “grey beards” who know it well. There will always be legacy codebases that make extensive use of jQuery that will never be rewritten and are too important to retire. jQuery is the new Cobol! I’m not a “grey beard” but I’m currently doing a freelance project updating the UI on a Perl+jQuery site… As much as we would like to rewrite it from scratch it’s very unlikely to ever happen, it’s going to be maintained as is with small steps towards “modernisation” over time. 0: jQuery is used by between 15-40x more sites than React depending source: https://www.similartech.com/compare/jquery-vs-react-js https://www.similartech.com/compare/jquery-vs-react-js https://w3techs.com/technologies/comparison/js-jquery,js-react https://w3techs.com/technologies/comparison/js-jquery,js-rea...
- dheera 4y agoTo be fair, vanilla JS, especially document.querySelector, still hasn't caught up with all the features of jQuery and any other framework is going to be much, much bigger than jQuery. It's not COBOL until something replaces jQuery that is easier than jQuery.
- DeathArrow 4y agoI rather not write 10 lines of Vanilla JS when I can write a line using jQuery. And I do prefer jQuery-style syntax for manipulating the DOM.
- atoav 4y agoAs somwone who constantly replaces jquey with vanilla js the difference is more like two lines of jquery against 3 lines of vannila js. One line more. But you have one dependency less, which is quite beneficial
- pseudosavant 4y agoUpdate: fixed formatting A lot of times the jQuery syntax is easier to understand (IMO). Remove element exmample: jQuery API: $('.element').remove() DOM API: document.querySelector('.element').parentNode.removeChild(document.querySelector('.element')) or if you want to introduce another variable just to remove the element: const child = document.querySelector('.element'); child.parentNode.removeChild(child); Create element example: jQuery API: const fooElement = $('<div class="foo" style="display: none">') DOM API: const fooElement = document.createElement('div'); fooElement.classList.add('foo'); fooElement.setAttribute('style', 'display: none'); I know which ones I'd rather write and read.
- egeozcan 4y agoHTMLElement.prototype.remove exists everywhere except IE: https://developer.mozilla.org/en-US/docs/Web/API/Element/remove https://developer.mozilla.org/en-US/docs/Web/API/Element/rem... Also for element creation: Object.assign(document.createElement("div"), { class: "foo", style: "display:none" }); I mean, you normally abstract these things with a helper fn or two, without importing the whole jQuery anyway.
- cogman10 4y agoIE 11 hits it’s EOL next month. So, really probably not a whole lot of reason not to just pull the trigger and inform everyone that complains of this fact.
- dlandis 4y ago> 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.
- judge2020 4y agoIt was just a reference to the person in the story, not an allusion to "because he was old he didn't try to update his knowledge/continue learning".
- squiffsquiff 4y agoSo why describe him as a "greybeard" then? It are you claiming to have met many younger and/or female 'greybeards'? If your answer is that 'it's just part of the story'. Well that's precisely the complaint.
- skavi 4y agogreybeard has always felt like a term of respect to me. personally i think of the type of person who could have been at bell labs in its heydays. definitely could exclude women though.
- capableweb 4y agoThe 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 greybeards of that company. Might as well say "veteran" or "old-timer", although "old-timer" would imply actual old age, "veteran" implies nothing like that.
- vlunkr 4y agoI 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 the site should keep jQuery, or that you should write a ton of new jQuery code.
- somehnacct3757 4y agoChrome 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.
- sefrost 4y agoI believe Safari has been doing it since 2013. https://bugs.webkit.org/show_bug.cgi?id=110269 https://bugs.webkit.org/show_bug.cgi?id=110269
- Gigachad 4y agoSomeone did tests on it before this and found that with how many versions and cdn sources there are, your exact jquery is almost never in the cache.
- vlunkr 4y agoFair enough. But it is still cached for your site.
- lelandfe 4y agojQuery is not unique in being cacheable
- underwater 4y agoReally proves the point that knowledge will atrophy. As a dev you need to invest in evergreen skills as well as trivia.
- SEJeff 4y agoAmusingly, 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 also absolutely would. So just because a tool is old doesn't mean it can't be used to solve real user problems. There are still banks and airlines that run COBOL, and as a user, do you really care that much? I'd take "knows $insert_older_less_hip_tech_here" as experience of having done something for awhile. Now if I was asked to write a front end today, I'd have to sit down and properly learn react + typescript (because javascript is awful without sensible type checking), and that would add to the time to ship, but is the correct thing to do.
- cogman10 4y agoWhile I think that’s the right choice, I’d just like to point out that the problem with jQuery today is it was a library built to smooth over and fix differences between browser JavaScript engines (IE, well, IE). Over the past 15 years or so browser JavaScript engines, except at the extreme edges, are roughly comparable. Further, a lot of the features of jQuery have been adopted into standard JavaScript. So, the reason of eschewing jQuery, even for small pages, is simply that you don’t need it. Vanilla JS (or typescript) + modern CSS have pretty much all the same capabilities without any of the bloat. Using it today would be a little like using a library made to back port java 8 features onto a java 5 JVM.
- deleted 4y ago[deleted]
- strbean 4y ago> smooth over and fix differences between browser JavaScript engines And let us avoid some of the extremely verbose and un-ergonomic standard APIs.
- tambourine_man 4y agoMootools, Prototype, all offered cross browser compatibility. The reason we're not discussing them today is that jQuery has a stupendous API that simply hasn't been matched yet.
- soperj 4y agoWhat newer libraries are you using for performance gains?
- arbitrage 4y agojQuery is dead, Netcraft confirms it? "Nobody goes to that restaurant anymore, it's too busy."
- planetsprite 4y agowhen you say veteran do u actually mean veteran of a real life combat war who later joined the games industry or veteran of the games industry
- Smaug123 4y agoYou know "veteran" does mean "someone with a lot of experience in something", right? In non-US countries that's even the primary meaning. https://dictionary.cambridge.org/dictionary/english/veteran https://dictionary.cambridge.org/dictionary/english/veteran, https://www.oxfordlearnersdictionaries.com/definition/english/veteran https://www.oxfordlearnersdictionaries.com/definition/englis... both give its primary meaning as "a person who has had a lot of experience of a particular activity" or similar. Even Wikipedia gives the generic definition first, and clarifies the more specific case as "military veteran".
- ThunderSizzle 4y agoThat doesn't answer the question. The ambiguity remains, and so does the question.
- 8ytecoder 4y agoFor everyone of these "grey beard" stories I can point you to a "young gun" story involving a fad of the week framework that's just over complicated and over engineered and doesn't even solve anything. A long time we had a really good engineer who can crack topcoder and coding challenges with ease. We had a problem where we had to collect all changes to the User models and send it to the marketing platform. It was initially implemented in Rails Active Record which took progressively more time to collect and sync changes. Rails was hot at the time and SQL was really frowned upon. A lot of developers to this day hate SQL. Then came a "grey beard" who simply rewrote the whole thing into a single complex query that let the database figure out the optimum way to find the exact same data. Total time went from over 10hrs to 10mins.
- Beltalowda 4y ago> I think of this story whenever I see jQuery popup on Hacker News. There is always a strong contingent of devs who swear by this library. But to me, they are like the old grey beard who didn't update his knowledge as the times changed. At one time jQuery allowed them to be the hero and "Get Things Done" faster than their competition. But times have changed. Whenever I want to use "vanilla JS" I use jQuery, because I find the DOM and various other JS APIs quite annoying to work with and jQuery makes things a lot smoother. There are some other, slightly smaller, libraries too, but they offer little advantages, are often unmaintained, and many people at least kind-of knows jQuery. Bombastic absolute statements about "greybeards" being "out of touch" etc. is basically why I tend to avoid the JavaScript frontend community by the way, and also why I moved towards backend rather than frontend. I'm too old to deal with people who think there is One True Way™ to do things and that everyone who disagrees is a blubbering idiot (not that FE JS have a monopoly on this by any means, but it's far more common there).
- dagaci 4y agoYes as a "greybeard" i noted first that the headline performance gain was 10% & 11% this for a team given far more time and resources to optimize for their goal than most teams or individuals dev. I raised an eyebrow at that However devs seeking employment should always be prepared to play up to what is trending vs what is appropriate.
- deleted 4y ago[deleted]
- Andrew_nenakhov 4y agoI fall in a different camp. If somebody proposes to use a brand new hot technology in a project that is planned to exist more than a few weeks, I tend to politely stop them in their tracks and use a stable reputable solution proven by time. You see, new hot technology is always replaced by another newer hot technology, and after hotness wanes, projects often become a abandoned and unmaintained. Extra this if the proposed hot new tech comes from Google. In this case person pushing it should not only be stopped, but also slapped hard, to help come back to senses.
- ConcernedCoder 4y agoThe part you're leaving out, is that once confronted with the fact that his old easy tricks don't apply, the well-seasoned fellow will draw on his years of experience to provide new tricks to save the day. I think your portrayal of well-seasoned engineers as the derogatory 'greybeard' with a 'bag of tricks' and a hero complex -- glosses over the fact that many of these men and women have real hands-on experience with a multitude of technologies spanning decades, and in my mind there's real value / leadership qualities associated with individuals companies can rely on to just "get things done" in a pinch.
- 0xCAP 4y agoSpeaking of gamedev and jQuery, I work at a company where we basically make games for education purposes, for high profile universities, mostly. The games are all web applications, and we've learned to bend React in each and every direction to best serve our uncommon use case. A few months ago we needed some extra firepower, and offloaded a project to a small team of external consultants. I'm still shocked by what they shipped: the smoothest and juiciest web game I've ever seen, made with the messiest and most ancient clusterf€#k of jQuery I've ever witnessed in existence. The moral of the story to me is: no matter how cool your new shiny tool is, old, battle-tested tools have generated generations of wizards which, given the right scenario, can still bring magic to the table.
- treeman79 4y agoI’ve seen a single jQuery developer be replace by a team of 20 angular developers a couple times now. The jQuery was far more productive
- jokethrowaway 4y agoYour examples (while beautiful) are fairly different from each other. The assembly tricks got obsoleted because they're not needed anymore - we simply don't program in that hardware anymore. jQuery still works fine to this day. It's just that engineers don't like it anymore. The same will happen to React in a few years. I wouldn't hire a jQuery developer for working in a cushy company with their millions and their React codebases - React knowledge is actually one of the things we test for (and, unexplainably, one of the few exceptions we'll allow to avoid knowing about algorithms and time complexity). If I had to build something with my money on the line, I'd definitely pick the jQuery veteran.
- smrtinsert 4y agoYeah this is why I fired my contractor for using a wrench. A hammer should be good enough.
- darepublic 4y agoJquery devs prob don't deserve as much credit as your old greybeard. And jquery was moreso used for browser compatibility and ease of use than performance or so I recall. On the topic of performance in web frameworks I often have to hear people tell me react is faster than plain vanilla Js. I used to argue the point but now I just smile and nod. Maybe the world has gone mad or maybe I'm the one out of touch
- dapids 4y agoI'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.
- de6u99er 4y agoLOL Recently I helicoptered into a call with three developers trying to execute a database upgrade and it seemed to be hanging. I joined the moment when they wanted to interrupt it and try again for the third time. Only thing I asked was, if something is locking the schema. Then I left to another meeting and I saw them exchanging statements to find locks and delete them in the chat. Turns out there were long running queries hanging that nobody seems to care about. To me it's hard to believe nobody has configured a query timeout on the database
- Abishek_Muthian 4y ago> I was writing websites before jQuery existed, during the reign of jQuery and still today Can I ask you about your current webstack?