My Driving Instructor taught me how to learn JavaScript

5 min read

Recently I’ve been diving more into learning Vanilla JavaScript. I’m doing this because most of my exposure to JavaScript over the course of my career has been through the lens of jQuery. Over the past few roles I’ve had, most of the heavy lifting of my job has been done through building a Front-End with PHP/HTML and CSS along with its infinitely helpful pre-processors.

For the most part, my job hasn’t involved a whole lot of involved JavaScript, as most of the functional stuff I’ve written has been a mesh of PHP and purpose-specific AJAX, working together within a CMS to achieve what I was going for, otherwise I was just using jQuery to do basic functions like generating elements and adding/removing classes from elements to implement some snazzy-looking animations or other such functionality with CSS, so I never really had a need to use more complicated functions within JavaScript.

Lately, though, I’ve been wanting to expand my skillset and look into learning some of these new-fangled JavaScript Frameworks all the cool kids have been talking about, but a lot of the research I’ve done into them has gone over my head for the most part because I lacked the knowledge of the core fundamentals that made up the clever functions they were using and the way they were streamlining them. So, I rolled up my sleeves and dove head-first into my journey of walking the beaten path and taming the beast that is modern JavaScript.

Luckily some of the principles I’ve learned doing other things in the tech sector have carried over to JavaScript principles, like knowing the basics like Classes and Objects from my time tinkering in C# in Unity or studying C++ in first year in my Uni days, but for the most part it’s been a symphony of “Ooohs” and “Ahhhs” and “So that’s how that works!”’s and I find myself thinking about something my driving instructor said to me when he first deemed me ready for my driving test.

When he had given me that good news, I asked him if we could drive more around the test area, because I wanted to know the area before I took my test so I would know what to look out for, but when I asked him that he said something that I’ve not quite been able to get out of my head since. 

He said “I could do what other instructors do and just teach you the test route and you’d probably do well enough on your test, but once you’ve got your license what then? What happens when you come up against something that just isn’t present in the place where you’re taking your test? What if another driver behaves in a way you don’t expect and because you don’t know how to deal with it, something bad happens? No. My job is to teach you how to drive on any road or route, not just the test route.

I’ve been thinking about that a lot lately and I’ve found that it can very much apply in a programming context. During my times at the various jobs I’ve had over the course of my career, there have been times where we’ve used a CSS Framework like Bootstrap or Tailwind that I’ve never used before, but I’ve always been able to pick it up pretty quickly because I know the core concepts behind what makes it tick. I know all of this because most of the formative time at the beginning of my career was spent writing straight CSS (with some pre-processor goodness sprinkled in there).

Similarly, there have been times where I’ve been able to do my job because I know the fundamentals in jQuery, but when things have gotten more complicated, I’ve found them harder to work out how to do and how to reverse engineer answers I find on Stack Overflow and actually understand how they work so I can put them into the context that I need them for. I’ve known jQuery so I’ve been able to get the jobs I’ve had, but I could know so much more and am learning so much more than I thought I knew from diving into what makes jQuery and other JavaScript Libraries/Frameworks tick.

So here I find myself, learning Vanilla JS and understanding the pieces of what I already know and watching them slide into place, making sense as to why they work the way they do and seeing snippets of Frameworks I haven’t used yet (at the time of writing) like React and Vue and actually being able to see what they’re doing under the hood has given me such a fresh perspective on this job and what it has to offer.

In summary, whether you’ve been learning CSS using Bootstrap or TailwindCSS, or you’ve been learning how to use JavaScript by using jQuery, that’s totally fine. But I find the salt is in knowing the original language they’re derived from.

TLDR; My driving instructor taught me how to drive on any road/route instead of just learning the test route, and I think this can apply in learning programming languages that have popular libraries/frameworks that people use a lot.