Lesson Description

The "Introduction" Lesson is part of the full, JavaScript: The Hard Parts, v3 course featured in this preview video. Here's what you'd learn in this lesson:

Will Sentance begins the course by explaining the importance of building a deep foundation of the core principles of JavaScript. This course covers five critical areas: higher-order functions, closure, async programming, OOP, and type coercion—along with recent JavaScript features like immutable array methods and promise aborts.

Preview

Transcript from the "Introduction" Lesson

[00:00:00]
>> Will Sentance: We are back for more JavaScript: The Hard Parts because you missed us all so much. We're going to hit the principles behind it, we're going to hit higher-order functions, closure, type coercion, the prototype chain, object-oriented programming, and asynchronicity. There's me with my Lego, which is my pride, and there's me wearing what now, of course, looks like very contemporary wear, but at the time, I think was at best ill-chosen.

[00:00:34]
There is my four sisters carrying me last two weeks ago, and they've been, yeah, carrying me ever since. And that's my background. Not much more to say there. Oh, I founded CodeSmith, which is the preeminent coding school in the US, hopefully. 5000 grads across the world, so maybe some of you know people who've gone to CodeSmith. I know there's plenty of people here in Minneapolis. The mission has always been to create that next generation of engineering leaders, I think, built on what we'll focus on today, which I know all of you are very passionate and committed to, which is the ability to not only grow yourselves as engineers, but also grow those around you.

[00:01:28]
Something we talk about through the lens of technical communication. The ability to explain hard stuff to other people, because if you can explain it to somebody else, I think it's a good measure of whether you can understand it yourself. So that's what we're going to focus on this workshop. If you have been to Hard Parts before, you'll know that we do blackboard through everything that we do in order to see not only how the code is written, but I guess how the code is dynamically run.

[00:02:01]
Right, we save code in a file that is not the running of the code. So we're going to visualize the running of the code as we go, hopefully to enable us particularly to grow in those top two things that I think are key to being a great software engineer. The ability to problem solve, which I think depends on an under the hood understanding of the code, and the ability to explain how it's working line by line to other people.

[00:02:29]
That should drive your engineering approach, which is the smart judgment calls you make as an engineer. And of course it should be dependent on you growing your underlying knowledge, but for folk who are in this room and online, who are newer to JavaScript, perhaps, we're going to build out piece by piece from how code runs in its most vanilla, most basic form, all the way through to extremely hopefully challenging parts, but having built out the foundations, you will have the ability to join the dots the whole way through.

[00:03:07]
So if you are very experienced in programming, do not fear, it's going to be all about, at least for the easier parts, practicing how you can verbalize your code, all the way through to for the very hard bits. Hopefully, even for those who are newer, they can track through, but for folk who are more experienced, really start to understand how some of the things you've done for years are working under the hood.

[00:03:33]
And that should enable you, well, let's see, I've got it written here. Here we go. Hard Parts of JavaScript, we'll build mental models of how JavaScript, and to be fair, many programming languages are working under the hood. And these principles sit behind not just JavaScript, but obviously Node, React, Next, but even other contemporary languages like Go, like Rust, and even obscure languages like Haskell.

[00:04:00]
These are languages that follow some of the JavaScript principles. JavaScript, in some ways, by being such a collaboratively developed language over the decades actually has adopted many of the features of other languages, but also other languages have gone on to adopt many of the features that became prominent first in JavaScript. So that's foundational mental models that will be translatable into other languages that we've already heard people in the room like C, Go are using.

[00:04:31]
But we'll start with the foundations and then dive deep into what I think are the five pillars that are making up the hardest parts of JavaScript. Higher-order functions or functions that can take in another function and or return out a function, it can host a function. Closure, which is one of the consequences of that, returning out a function. Asynchronous JavaScript, also related to the notion of passing in a function, but this is one that we're going to delay until later and run out of sync with our code.

[00:05:06]
Object-oriented programming, which in JavaScript is implemented in some quite, in some ways that don't necessarily reflect other object-oriented languages. One of the gotchas of JavaScript is the apparent appearance of regular object-oriented principles at play and the reality of something quite, quite different under the hood, but as JavaScript has layered on features of classic object-oriented programming, it looks more and more like traditional object-oriented languages.

[00:05:37]
In fact, we're going to hit private static fields, a classic feature of object-oriented languages, but we're going to hit it in JavaScript, a recently added feature. And then we'll also have type coercion, one of the most notorious parts of JavaScript. We heard about TypeScript already, is to some degree a countervailing force against the notorious type coercion nature of JavaScript. We're going to learn to take manual control of our type coercion.

[00:06:08]
And we will then, yeah, do that and extend into some new pieces that have emerged in the last couple of years in JavaScript, immutable array methods because we will learn that some of the classic things you could do to arrays in JavaScript were in fact changing the underlying arrays as your default built-in functions, something that I would describe as potentially a crime. We'll learn about the brilliant promises, which I'm sure we all love, that for the first two years, you couldn't stop.

[00:06:40]
For the first two years of promises, there was no way to stop them if you didn't like them. We'll learn about how to abort promises, we'll learn about a way of dealing with large numbers, big integers, and we'll extend our OOP into private and static fields. And through all of this, I hope that we'll be able to use modern JavaScript to build clean, reliable, easily tractable code that we can share between us and our teams.

[00:07:13]
And then here's the key goal, we have these foundations down, we will be able to tackle any new feature, any new tool, any new codebase, which particularly as we have an unprecedented sense of change in technology, in what it is to build software, a lot of what we're really trying to do in Hard Parts is build the ability to dissect any new language, any new framework, any new tool, any new protocol, and not be trapped by the language that we previously knew, but the ability to grow for the rest of our careers.

[00:07:48]
So there we go, here we go, we've got principles of JavaScript coming, callback and higher-order functions, closure, which is all about the glorious lexical scoping and what that gives us, type coercion, oh, and metaprogramming, which is a consequence of one of the features we'll introduce in type coercion known as Symbols. Perhaps one of the hardest things to get our heads around, but it enables metaprogramming.

[00:00:00]
Then we'll do asynchronous JavaScript, the event loop, and then we'll do class. We're going to do the full map of the JavaScript land.

Learn Straight from the Experts Who Shape the Modern Web

  • 250+
    In-depth Courses
  • Industry Leading Experts
  • 24
    Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now