Hacker News new | comments | show | ask | jobs | submit login

The whole "lets use jQuery without learning Javascript" thing didn't work out so well for the community.

Just a data point. I'm not saying I was right, but I learned to use jQuery first, which then lead me to learn vanilla JavaScript. Basic jQuery implementation (carousel, slider, slideshow, etc) was like following a recipe. It got me early gains. I eventually needed more custom work so I then dove (and continue to dive) into JavaScript.

I can see the same path for an HTML/CSS beginner.

If not for jQuery, I'd have probably never learned Javascript, because I would have gotten frustrated with dealing with weird cross-browser gotchas too much to ever get anything done.

As I learned I wrote a lot of code I'm not too proud of, looking back on it. But I grew to learn and love Javascript and I honestly have jQuery to thank for that.

Writing code you aren't proud of is step one towards writing code you are proud of.

Of course the problem with that is the code you ARE proud of rapidly becomes the kind you aren't proud of as you learn more.

We have a similar saying at the office. "Every programmer hates every other programmer's code. Given enough time, they'll eventually hate their own code."

Given that for a long while many JavaScript answers on SO were 'use jQuery' for very good reasons I can't help but think you're a bit out of touch.

Actually a bit is being kind. It's rare to come across a site not using jQuery. I write a fair few personal scraping scripts and it's very rare I actually have to add jQuery.


And yet all of these seemingly negative results arguably drove the development of more interactive web interfaces, rekindled a broader interest in Javascript, eventually resulting in better libraries and, ultimately, things like Node.js being possible.

You're claiming node.js wouldn't exist without jquery?

jQuery might as well be a different language, like c++ vs. c. Can you learn c++ without c, or assembler without learning machine code? Sure.

Actually, in many ways I think learning jQuery before learning vanilla javascript can be an advantage. jQuery is heavy on functional programming techniques, list comprehensions, and such-like. As long as you learn well and don't cut corners I don't see any problems with "learning jQuery" on its own.

I disagree, jQuery is more of a compatibility layer. Think of it (in a way) like an ORM for various SQL backends. They allow you to change between different SQL implementations without needing to learn the various nuances of each engine. The same can be said for jQuery, allowing you to modify classes even though browsers implement that DOM property differently.

I know you're being an asshole, but jQuery solves DOM query/manipulation pretty well. Generally, if you use javascript for DOM query/manipulation you're either really stupid or really smart, pick one.

I'd say neither--it's just after the first couple document.createElement, you're driven to the brink of insanity. No one chooses that kind of torture, smart or dumb.

jQuery has two big benefits for me: cutting down on verbosity a bit, and on making a cross-browser solution possible. For the latter various polyfills solve the problem effectively, but the verbosity problem still remains.

no, but jQuery is a great way to learn how to write javascript, because it gives you a good framework of basic functionality.

The handwritten code I used to use for element detection was a thing of evil, that kept on getting cut-and-pasted around because it worked.

The conciseness and cleanness of using jQuery was a welcome change.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact