4 ms·
"My only piece of advice is to get a solid background in JavaScript, then move forward, appreciate the blood, sweat and tears Resig put into jQuery" I hear thi
by mattangriffel 14y ago
"My only piece of advice is to get a solid background in JavaScript, then move forward, appreciate the blood, sweat and tears Resig put into jQuery"
I hear this point made a lot, for example in reference to learning Ruby before Rails or C before Ruby, but I don't think it's right. They used to teach kids Latin before Spanish or French (in the 1700s):
"We are told that it is proper to begin first with the Latin, and having acquir'd that, it will be more easy to attain those modern languages which are deriv'd from it" (quote from Ben Franklin's autobiography)
But that's silly and no one does this anymore because LATIN SUCKS and it's harder to learn Latin than any other language. jQuery is easier to learn than JavaScript. Why not start with jQuery and then learn JavaScript after?
- vanderZwan 14y agoThat analogy doesn't really hold, because Spanish and French do not run on Latin under the hood, so they don't hide away the complexities or any errors you might be making while using those languages. On the other hand, it's quite a reasonable assumption that getting a good understanding of JavaScript gives a broader context of what is going on that is necessary to properly use jQuery.
- mattangriffel 14y agoFirst, Spanish, French, and other romance languages are derived from Latin, and so the thinking was exactly that. Learn Latin and you'll have a better understanding of what's going on. Second, the argument that language X runs language Y under the hood so you should learn Y in order to get a good understanding of X doesn't hold. JavaScript is written in C++ in most cases, which compiles into assembly. So why not learn assembly to get a better understanding of JavaScript? That's silly.
- ditonal 14y agoThere are big differences between a language being derived from another language, having it's interpreter written in another language, and actually being a framework written in the same language. Your "Don't learn Latin before French" analogy makes sense for those claiming you should learn C before Ruby. But jQuery doesn't derive from Javascript, it's a framework written in Javascript. If you write jQuery, you will run into Javascript issues, because you are writing Javascript. Even if you could make the argument it's a similar philosophical idea, anybody with experience will know in practice that a jQuery coder will run into Javascript issues much, much more frequently than a C++ or assembly issue. The leap is much, much smaller. The best analogy I can think of along the human language lines is instead of a French student learning Latin, it would be a student of business French being encouraged to better understand all of spoken French. With all that said, I also lean towards "just learn what you want or need to know" train of thought. I think those of us who enjoy learning what's under the hood overestimate it's necessity for "getting things done". I don't think there's anything wrong with learning and using jQuery without diving into the messier details of vanilla Javascript unless necessary. Also, for many of us, those ugly situations when we are forced to figure out what's going on behind the scenes is when we actually understand it anyway.
- Trufa 14y agoAs an anecdote, when I wanted to learn how to code, I read through several articles in the Internet, I unfortunately believed one I found that said that everyone should learn to code first in C++ (or C) since then you could learn from the start what was going on under the hood. After a certain amount of time, I got completely bored of making the computer count numbers with for loops and doing games using only "if", I wanted a GUI, something I could see. This proved to be insanely difficult (at that time)! So, somehow I came by PHP, suddenly I was doing things that I could see, god damn webpages, I was so happy, I was doing (not really) useful things. I later noticed that some web page "did things without reloading", because, that was cool! So I came upon this thing called Javascript and, and read things about AJAX, it all seemed pretty cool, and I could make things work copying and pasting, but believe me, I had no idea what was going on! So suddenly, some strange thing with an awkward syntax came by called jQuery, and suddely I could do: $('#myForm').ajaxForm(function() { alert("Thank you for your comment!"); }); and everything worked exactly as expected, I loved this new "programming language". I later came to know that was not a programming language in itself, rather a library, and I swear that's when it freaking clicked, finally I understood what abstraction was, before I knew it I was doing all kind of more useful things, not only web now because I came upon python, another language that coincidentally abstract you from most of the common problems when coding. This story came out pretty long, but I the moral would be that the more abstract you are from the machine problems when you are starting the better. Many argue that not knowing what goes on under the hood will make you a bad programmer, and I couldn't agree more! The problem is that you will have shitty programmers one way or another, I'm sure lot's of people who started by coding assembler never got to great programmers because they know where the bits are going. Abstraction is probably the most useful weapon in our arsenal as human beings and we should make as much use of it as possible, get as far away as possible from the issues that don't concern the immediate problem you want to solve when you're starting. If that means starting with jQuery because you type less and thing magically work somehow, so be it.
- ricardobeat 14y agojQuery is not a language. You'll be learning a small subset of javascript and lots of misconceptions.