Transcript from the "Course Plan" Lesson
[00:00:48] And that's not a requirement, it's just a recommendation that you at least be familiar with the language. So we could call that sort of somewhere between beginner and intermediate in terms of your experience, kind of your base experience. I'm not gonna teach you how for loops work, I'm going to expect that you understand stuff like that.
[00:01:02] But I am gonna take things which you might consider to be basics. Things like lexical scope, which you just sort of, maybe you never heard it called that, but you just sort of understand kind of intuitively. We're gonna take that stuff and break it down into extremely deep detail.
[00:02:22] Infinite numbers of blogs and books that talk about that sort of stuff, that's not what today is. Today is gonna be a very narrow scope of what we're gonna discuss, but we're gonna go extremely deep with it. We're gonna dig our teeth deep into this stuff, so that's what I mean by advanced.
[00:02:35] And when I say the what you need to know parts, obviously I'm making a play off of Crockford's The Good Parts. But when I say the what you need to know parts, I'm going to explain to you when we talked about the this keyword. Or when we talk about the definition of what closure means.
[00:02:49] I'm going to explain to you in what I hope is more understandable terms than just quoting to you the spec. I'm not just gonna show you a bunch of screenshots of what the spec says. Although I think it's important to be aware of what the spec says, so that you're not saying things incorrectly.
[00:03:04] My focus here is to give you practical takeaways on things, so this is the what you need to know definitions for these things, rather than necessarily the academic ones. There will be people that will disagree with me and say no, no, no, that's not a type. Or no, no, no, that's not really accurate about closures.
[00:03:18] And my answer to that is to just shrug and say, well. I'm not interested in being academically formal, I'm more interested in giving us practical understanding.
>> Kyle Simpson: Okay. So, without any further ado, this is gonna be our first discussion. Point we're gonna spend a good portion of the morning talking about scope and closures.
[00:03:39] So we're gonna start by talking about Nested Scope, we're gonna move into a discussion of Hoisting. May or may not of ever heard of what hoisting is. Now I'm gonna do something kind of interesting, cuz if you don't understand anything about these mechanisms. It should seem strange to you that third item on the list, when I talk about the this keyword.
[00:03:54] Sort of injected right in the middle of the discussion about lexical closures. Maybe that seems weird, maybe it doesn't. If it doesn't seem weird to you, I hope it does seem weird to you by the time we get there. Because the point is actually that these are completely opposite mechanisms.
[00:04:08] So the reason I stick it right there in the middle is to make it really obvious, the contrast, the difference between them. So this is an unusual approach. In the books, I didn't deal with a this keyword inside of the scope in closures cuz my editor was like, no, that's too weird.
[00:04:21] But when I'm doing training, I can do whatever I want and I think it's better to talk about it there, so that we can contrast. So that's intentional that it's kind of weird, but then we'll jump right back into a discussion of closure. And I should also say, there will be a fair amount of lecturing.
[00:04:35] I'm gonna do a bunch of talking and thing's like that, but there is also as you know, there are five exercises. Each one of those is designed to be anywhere from seven or eight minutes up to fifteen minutes of free time that you're working on something. Or I give you the exercise, I give you some time to work on it.
[00:04:52] I shut up for a little bit and then I come back and kind of give you a guided solution tour if you will, kind of how I would approach things. There's no right answer to any of this stuff, but I do provide in each one of those exercises, a fixed version of the files that gives you my example of how I would have done it.
[00:05:08] So at a later time you can come back and say, well how did Kyle do it? But that doesn't necessarily mean that's the only way to do it, so there will be exercises for you to do. Now if we contrast that to what we're gonna deal with tomorrow, there's comparatively a lot less lecture tomorrow and a whole bunch of just hacking at the code terminal.
[00:05:23] So there's very few slides, and we spend most of our time just kind of live coding, tomorrow. So if you're really looking for that code and you feel like I'm lecturing and I'm too much boring, just hold off until tomorrow. If you like the lecture stuff, there'll be plenty of that today.
[00:05:55] I'm gonna assume that you understand what that means and I can't assume that today. Even if I looked at some of the responses from the pre-event surveys. Some people felt really confident with the stuff and other people are coming in with not quite so much confidence. So the goal is that everybody walks away from today with that confidence.