Demystifying JavaScript with Todd Motto

Todd MottoTodd Motto is helping to demystify some of the misconceptions about how difficult JavaScript really is. Craig spoke to him about his talk coming soon at Future of Web Design.

SITEPOINT (Craig Buckler): Hey Todd. Tell us a little about yourself and what you do.

TODD: Hey! I’m Todd, I’m 23, and a JavaScript and HTML5 developer. By day I’m lead front-end engineer at Appsbroker – we’re a Google Enterprise company that specializes in Cloud Platform technology solutions, which means we develop lots of fantastic software. By night, I’m an open source evangelist where I write scripts, utilities, plug-ins, frameworks and boilerplates. I’ve worked for Intel and Rolling Stone magazine during the past year and love teaching others about web and software development.

SITEPOINT: How did you get into conference talking?

TODD: I started doing a few smaller presentations — nothing bigger than a roomful of people — until last year when I flew out to San Francisco for HTML5 Dev Conf. While I was there, I visited a friend at Google who invited me to teach a workshop. I absolutely loved it! I wanted to do more sharing knowledge and teaching when I was contacted by Future Insights to speak at FOWD. I’ve spoken at a few meet-ups and events since last year to a variety of audiences.

SITEPOINT: Your FOWD talk is titled “Demystifying JavaScript: You Don’t Need jQuery”. There’s been a recent up-swell in anti-jQuery sentiment on the web; why do you think that is?

TODD: There has indeed, but unless you’ve a valid reason, anyone preaching “No jQuery” should tread carefully.

I hope my talk excites jQuery and new JavaScript developers into learning some great new things and opens doors they didn’t know were there. I’m looking to show developers the similarities between modern JavaScript APIs and jQuery.

Rather than being anti-jQuery, I want to show developers the alternative options. JavaScript isn’t perfect — there are bugs but, as we learn to combat them, we do our jobs better and get more experience. Sometimes, it’s good to know how to fix something than let a library gloss over the implementation details.

I recently wrote about the topic. It was well received which inspired me to pick it for my FOWD talk.

SITEPOINT: Developers often use jQuery as an unnecessary crutch. Does JavaScript have a reputation for being difficult?

TODD: It definitely does have that reputation and with good reason. Douglas Crockford dubbed it one of the most misunderstood programming languages ever and there are many good and bad parts. It’s taken me great effort to understand JavaScript at the level I do today. It comes from reading books, studying and researching anything I didn’t know. As a front-end developer, I wanted to master the front-end stack.

jQuery will provide a crutch for those who do not want to learn JavaScript beyond a certain level — and that’s OK for them. I used to do the same but it can lead to sticky situations. Some problems can only be solved in JavaScript — not jQuery alone.

SITEPOINT: Is jQuery useful for novice JavaScript developers or can it lead to bad practices?

TODD: jQuery provides great sugar syntax and developers love it. But it does allow us to write terribly verbose and ugly code. I have but, when you begin to learn JavaScript, you uncover the great parts of the language. Some code I was writing in jQuery I’d never do in JavaScript.

SITEPOINT: Do you think developers can drop jQuery completely or are there situations when it’s justified?

TODD: Dropping jQuery altogether is perhaps not always suitable. I’ve written a few JavaScript-only projects with no libraries, the biggest was around 1,000 lines. The point isn’t to use jQuery or not — the point is to not be reliant on jQuery.

jQuery should be used sensibly and I’d encourage developers to look at learning some of the JavaScript equivalents to learn more about what’s happening in jQuery’s methods. In some cases, mixing JavaScript and jQuery is a perfect solution. The more JavaScript you learn, the less you’ll probably want to use jQuery.

SITEPOINT: Can you see a time when the jQuery project is abandoned altogether?

TODD: Maybe. Who knows?! JavaScript is changing rapidly — it’s an exciting time. I love the jQuery project and would hate to see it abandoned but we may reach a point when jQuery is merely providing shorter or alternative wrappers to methods which are almost identical in modern JavaScript. ECMAScript 6 (the latest version of JavaScript) is the biggest change of the language since inception and it’ll be interesting to see how jQuery adapts.

SITEPOINT: Are you looking forward to seeing any other speakers at FOWD?

TODD: I’m looking forward to seeing all the speakers and meeting them in person!

SITEPOINT: Many thanks, Todd.

Todd Motto joins Paul Boag, Peter Gasston, Harry Roberts and other amazing speakers at Future Of Web Design (FOWD) in London from April 7th-9th. Craig will also be there begging for article ideas! A few tickets are still available so don’t delay!

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • fungus_Amongus

    This article did nothing to demystify JavaScript fyi

  • Tsegaselassie

    I find the attack against jQuery very unnecessary. Even though I can use plain JavaScript for many of the things I do on the front-end, I prefer to use jQuery instead. I like it, no I LOVE it! For me it does what I need it to do, the way I want it done. It’s clean, it’s easier to grasp, a lot of people know how to use it and there are great many plugins out there.

    For the life of me, I just don’t know why your hating on jQuery; maybe it’s become too popular … yeah that’s probably it. Don’t get me wrong though, plain JS has its place.

    • http://www.toddmotto.com/ Todd Motto

      Did you even read the interview? “Rather than being anti-jQuery, I want to show developers the alternative options. JavaScript isn’t perfect — there are bugs but, as we learn to combat them, we do our jobs better and get more experience. Sometimes, it’s good to know how to fix something than let a library gloss over the implementation details.”

      • Tsegaselassie

        “Did you even read the interview?” of course I did … and here is what I read:

        Developers often use jQuery as an unnecessary crutch,

        Is jQuery useful for novice JavaScript developers or can it lead to bad practices?

        Do you think developers can drop jQuery completely or are there situations when it’s justified?

        HERE IS THE BIG ONE: Can you see a time when the jQuery project is abandoned altogether?

        So tell me, where in the interview did you guys discuss about JavaScript being a unique language that is easy to learn but hard to master. Hey, you can even take into consideration you title for the talk “Demystifying JavaScript: You Don’t Need jQuery”, is jQuery the only thing in JavaScript? Why not change your title to something in the lines of “Learn JavaScript: The best way!”.

        Please understand I’m not commenting back to start a flame war, I’m only commenting because I was disappointed to see the interview as being anti-jQuery (in a subtle way) and not about JavaScript’s qualities. This also goes out to you too, @craigbuckler:disqus.

        • LouisLazaris

          @tsegaselassie:disqus Late response to this, but I’m not sure why you are offended at the “anti-jQuery” sentiments, even if they do exist (which they don’t).

          Let’s say Todd Motto hates jQuery and wants everyone to abandon it (which he doesn’t, this is hypothetical). So what? jQuery is a tool. It’s not a human being. We’re not being racist here. There’s no reason to react so strongly to someone rejecting a tool for something different.

          Two quotes from the interview that I like are:

          > jQuery will provide a crutch for those who do not want to learn JavaScript beyond a certain level — and that’s OK for them. I used to do the same but it can lead to sticky situations. Some problems can only be solved in JavaScript — not jQuery alone.

          You can see Todd is promoting the concept of problem solving, he is not being anti-jQuery. He is trying to show developers that there could be a better way, in many cases.

          And further he said:

          > Dropping jQuery altogether is perhaps not always suitable. I’ve written a few JavaScript-only projects with no libraries, the biggest was around 1,000 lines. The point isn’t to use jQuery or not — the point is to not be reliant on jQuery.

          Again, nothing anti-jQuery here, he’s just trying to help developers see that they can write better code without it in a lot of situations.

          • http://www.toddmotto.com/ Todd Motto

            Thanks very much Louis, great reply.

  • http://www.technbuzz.com/ Samiullah Khan

    I would definitely never wish for jQuery to be abandoned, because it solves cross browser issues and doing complex selections

    • http://www.toddmotto.com/ Todd Motto

      Cross browser consistency will not require a huge library to wrap all your functionality into. “Complex selections” in JavaScript can be done via document.querySelectorAll(‘li[some-attribute]‘); exactly the same as how jQuery does it.

    • Craig Buckler

      Remember that the browsers have caught up. querySelector and querySelectorAll are supported everywhere – even IE8.

  • Luis Martins

    I’ve been working on the web for a while, 15 years to precise. All this time i’ve been doing mostly design and front-end code (html and css). Only recently I’ve started to become more involved with Javascript, beyond the “just add a jQuery plugin” mentality.

    I work on a team of some very proficient developers. Still, now that im starting to pickup some knowledge, I realize that even many of them often fall into the trap of just resorting to jQuery for every single task at hand.

    I love jQuery, it is invaluable in many situations, but knowing your tools is essential to really master your job. I always enjoy Todd’s posts and im thankful for the knowledge he put’s out there for those of us who didn’t started our careers with coding.