Home » none » Does jQuery Make Us Lazy?

Does jQuery Make Us Lazy?

A04C0041

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.

Like this Article? Subscribe to get every article sent to your email.

Related Post

  • Getting started with jQuery and ASP.NETGetting started with jQuery and ASP.NET As promised, I am starting a series on jQuery.  Today our goal is to get a project setup in Visual Studio that uses jQuery.  We won't be explaining much in the way of syntax, but we will […]
  • Which Language VB or CSharp?Which Language VB or CSharp? I wrote the following article a long time ago on my main domain, but recently I had a reader send in a question that this article addresses.  So I’m putting this article here so that it is […]
  • Copy And Paste And BugsCopy And Paste And Bugs We all do it.  I’m sure of it.  It’s too easy. I need code that looks almost like something else I wrote so I just copy and paste it over to the new code.  Done. But at […]
  • jQuery Looks like XPathjQuery Looks like XPath So far in our examination of jQuery we've seen how to select an ID, select a set of elements by tag name and select a set of elements by their class.  But what if we wanted to select a […]
  • jQuery ProgressbarjQuery Progressbar Once you venture into the land of AJAX you’ll soon discover the need to let your user know that some work is taking place in the background.  If you can, you’ll want to let them know […]

About Dave Bush

Dave Bush is a Full Stack ASP.NET developer. His commitment to quality through test driven development, vast knowledge of C#, HTML, CSS and JavaScript as well as his ability to mentor younger programmers and his passion for Agile/Scrum as defined by the Agile Manifesto and the Scrum Alliance will certainly be an asset to your organization.

One Pingback/Trackback

  • http://www.imaginationeverywhere.com 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.

  • http://erikzaadi.blogspot.com 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..

    Cheers,

    Erik

  • 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.

  • Pingback: Dew Dump – June 19, 2009 | Alvin Ashcraft's Morning Dew()

  • http://www.elegantcode.com Chris Brandsma

    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.

  • http://www.webtrafficroi.com [email protected] Marketing Blog

    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.

  • http://twitter.com/MarkyRoden/status/172531130078216192/ Mark Roden (@MarkyRoden)

    Does jQuery Make Us Lazy? http://t.co/mi90bD47
    Being lazy is equivantly to productive!