Check out a free preview of the full Introduction to JavaScript course

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

Brian Holt introduces himself, and sets expectations for the next section.

Preview
Close

Transcript from the "Introduction" Lesson

[00:00:03]
>> Brian Holt: I am not Jen.
>> Group: [LAUGH]
>> Brian Holt: [LAUGH] You probably noticed that. My name is Brian Holt, and I was making this comment earlier to Jen that I feel like I'm the bad cop of good cop, bad cop here.
>> Group: [LAUGH]
>> Brian Holt: That you gotta learn this awesome HTML, CSS stuff, and the payoff for HTML and CSS is very immediate, and it's very gratifying up front, and JavaScript is a little bit more difficult to learn up front.

[00:00:33]
So just before we even get started here I just want to give you permission to feel like this is hard, because it's kind of hard, and when I say kind of hard it's actually quite hard. So, [LAUGH] if you're sitting there despairing a little bit, I guarantee you you're not the only one feeling that way, in fact your teacher might actually be feeling that way at the same time too.

[00:00:50]
So, given all of that, just to give a bit of an introduction, I am Brian Holt. I am currently living in Seattle, Washington. This is my, I can't even count how many times I've been back to Frontend Masters, but umpteenth time back to Frontend Masters, and I'm really, really excited to be teaching this bootcamp.

[00:01:14]
So, you can see here we're on the course website here, and we're gonna be starting here from section 9: Programming Fundamentals. So, we're gonna kind of switch gears here a little bit. We're gonna move from more of the declarative nature, which means, inform a computer, this is how this looks, this is where this goes, to more of what we call an imperative nature, which is going to be telling the computer how to do things.

[00:01:42]
We're going to be writing notes down that the computer will then execute for us. It's almost like writing an essay that your computer knows how to execute.
>> Brian Holt: So, you can see here I have this, what is code? It's kind of a dumb question, but it may surprise you.

[00:02:02]
So I actually stole this idea from a different Frontend Masters teacher who's name is Kyle Simpson, who, after the bootcamp, would be a very good teacher for you to watch. Code is for humans first, and that kind of seems counter intuitive, you would think well, we're writing code so that computers can execute this, so why are we writing it for humans?

[00:02:20]
Well, in reality you never write code just once, right? In reality, when you're shipping code at a company, you write code and then you're gonna have to come back and change it, and change it, and change it again, and change it again. And then there's gonna be a bug, and you have to go fix it, and then you're gonna have to add more features, and so you're gonna have to modify it, and then the designers decided to make this animate a different way, and you have to go back and modify it again.

[00:02:42]
So in reality, the code that you write is really for your future self. It's for your future coworkers so that they can go back in later, understand what your intentions were, and then be able to change that in order to fix the bug, or change the feature, or whatever that may be.

[00:02:58]
So, that being said, you always want to write the most clear code possible. If you have two choices of being clever and terse, or being explicit and verbose, always go with the ladder. It's better to write more if it's more understandable. Always, always err on the side of being more understandable.

[00:03:17]
When you have problems later then you can go back and change it to be clever, but for the most part, you always want to be clear. So that is what I am gonna try and teach you today, and that's kind of something that I want you to hold onto, because it is a bit counter-intuitive.

[00:03:29]
We kind of want to play what's referred to as code-golf, how condensed can I get this? Every character is another stroke, right, so you want to get this down to as small as possible. In reality that's, as your future possible coworker, don't do that, please. [LAUGH] Please, write clear code.

[00:03:49]
So that's what I want to get into. It's worth sitting down and taking the time to write clear code.

Learn Straight from the Experts Who Shape the Modern Web

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