Does jQuery Make Us Lazy?


Yesterday I read a post that proposed that using jQuery as the answer to every javascript problem makes us lazy programmers.

This is not what I was expecting to hear since the post was titled, “Is jQuery always the answer?”  To that, I could easily agree, no it is not.

But the article actually went on to argue that using jQuery for every javascript-related problem makes us too dependent on a library and abstracts too much of the JavaScript internals and therefore makes the up and coming programmer who never had to use raw JavaScript a less capable programmer.  Most of those arguments have been taken out of the original post, but you can see many of the same arguments in the comments.

Yep.  jQuery might not be the right solution

So first let me concede that using jQuery for every JavaScript problem might not be the right solution.  But saying that using a library or a new language that abstracts the previous generation of programming tools makes us lazy just doesn’t make sense. 

But Does The Logic Make Sense?

First, if you want to use that logic, you should be doing all of your programming in ones and zeros.  I mean, REALLY!  Come on, people.  The whole reason we have assembly language is so we don’t have to do that.  The reason C was created was so we don’t have to write assembly language.  In fact, every progression in programming has been so that we have to know less and less about the internals and so we can just get the job at hand done.

Is Being Lazy Bad?

Good programmers ARE lazy to a certain extent.  That’s one of the things that makes them good.  Having programmed now for 20 years, I’m at the point where I don’t want to write any more code than I have to.  I copy and paste more code than I write, or I buy a library, or find something open source.

Would it be good for programmers to learn raw JavaScript?  Sure it would.  Is it necessary?  Probably no more than it is to learn Assembler.

Will learning raw JavaScript make a jQuery programmer a better programmer?  Probably not any more than learning Assembler would make him a better CSharp or VB.NET programmer.

Keep the eye on the ball, people. 

Programming isn’t about how much you know.  It’s about what you can get done.  This includes both as you write the initial code and as you maintain the code.  You don’t need to know JavaScript to write maintainable code in jQuery any more than you need to know Assembler to write maintainable code in CSharp or VB.NET.  In fact, in both cases, writing in the lower level language will probably make your code less maintainable.  That’s a far worse programming sin than being a lazy programmer.

Related Post

9 Responses to “Does jQuery Make Us Lazy?”

  • Amen:

    This makes me feel good. Because as a beginner you feel like you have to learn everything and you get bogged down into minutia. So I am going to learn as much as I can but still manage what I can get done as efficiently as possible.

  • Erik:

    Nice article, although I don’t entire agree with the point that jQuery programmers should not know raw javascript.

    The more we know about the platform/framework/language we code in/for, the more efficient the result will be.

    If you are a ASP.NET developer, but you don’t know what a POST really is (just a small example) you are in trouble.
    You might write a lot of applications that will work fine, but they won’t be as efficient and well written if you’d grasp those very basic things.

    As for jQuery, one of the typical pitfalls for jQuery developers that only know the library and not the language (JavaScript) is inefficient DOM insertions in loops, unnecessary repeating selectors and non reusable code (and more)..

    Anyhow, nice post, and I do agree that you should be lazy to some point, that’s exactly the reason to use jQuery and not write XMLHttpRequest by yourself (and supporting it for all browsers).
    Having said that, you should know how the XMLHttpRequest works in general to optimize your code..



  • Dave:

    I never made the arguement that they “should not know” javascript. In fact, I concede that it will make them a better programmer. But so will knowing Assembler, or binary programming. And unless you’ve been programming longer than I have (20+ years) you probably don’t know those and have been programming just fine without them.

    It’s not knowing JavaScript that makes you know these things, it’s knowing how to use jQuery PROPERLY that is the issue.

    Again, keep the eye on the ball. What you know and how you learned it is not the issue.

  • Jonathan Hilgeman:

    An engineer (developer) who uses hammers and screwdrivers (jQuery) will be able to be more productive and creative if they understand physics (Javascript).

    Sure, he could use his raw knowledge of physics to build almost anything from scratch, but the tools are there to make the final product more refined and more stable.

  • Abe:

    I mostly agree but for one point – knowing raw JavaScript probably *does* make you a better jQuery programmer. You can do stupid things in any language, toolkit, library, what-have-you. But knowing the nitty gritty low-levels you’re probably less likely to do stupid things with the higher-level abstractions. Take C# for example. If you’re doing a lot of string concatenation then you should be using StringBuilder. Those with a C background intuitively know exactly why this is important. Those with a C#-only background may only know this (if she’s lucky) from reading it in a book.

  • [...] Does jQuery Make Us Lazy? (Dave M. Bush) [...]

  • I think it is important, as everyone else has stated, to both be intellectually rigorous, and know when it is best be be lazy.

    If I were to have to train a new developer how to do web work, I would head straight to JQuery. I would use JQuery as a JavaScript learning gateway drug. By the time the developer is done learning JQuery, then learning the rest of JavaScript would be much easier. Plus, they are already effective at producing code. I see that as a double bonus.

    Basically, I see the argument like this: should I learn the Windows API and C before I learn .net? I did learn it in that order…but that is only because I’m old. I would rather focus on effective productivity first, then go back to learn how everything works.

  • Nice read. jQuery has really opened up a world of browser interactivity to ASP.NET. I’m forwarding this to my few remaining “client-side-phobic” .NET buddies.

  • Does jQuery Make Us Lazy?
    Being lazy is equivantly to productive!

Leave a Reply

Comment Policy:

  • You must verify your comment by responding to the automated email that is sent to your email address. Unverified comments will never show.Leave a good comment that adds to the conversation and I'll leave your link in.
  • Leave me pure spam and I'll delete it.
  • Leave a general comment and I'll remove the link but keep the comment.

Notify me of followup comments via e-mail