Placeholder Image

字幕表 動画を再生する

  • Hello.

  • Thanks for tuning in.

  • This is a recording of an online training session, which was a beginner level class on the note.

  • Yes, run time.

  • This was a freestyle interactive, no slides, just me typing could and talking about it.

  • So let me apologize in advance for all the speech fillers.

  • I did, however, out the pauses and the not useful parts so you can watch the whole training here on YouTube.

  • In one video, it's 2.5 hours, but it's also available at Jake's.

  • Complete that com slash gs and 19 where I split it by topic and too many videos.

  • You can also use the time stamps links in the description to navigate through the different sections.

  • If you think of any questions while you watch this, please feel free to join the just complete slack channel at just complete dot com slash help and ask us there.

  • I hope you enjoy this class and please share it with your network.

  • If you know anyone who plans on exploring no jazz, let's get started.

  • So this is ah, beginner class on notes.

  • Oh, no assumptions about what you know about No, this is your first steps in note, I might be assuming that, you know, a little bit of Java script, and I am definitely assuming that, you know, programming in general.

  • So depending on your skills, you might be you might be overwhelmed, or you might be disappointed with the content.

  • We all have different skills, and this is natural, but I hope most of you will learn a few things anyway, the classes recorded.

  • So if you're lost in the class, go fill the gap in your knowledge and come back and watch the recorded class s Oh, my name is Sam, are bona and I have been doing notes for awhile.

  • Currently, I do note on the back, and then I do react on the firmament.

  • But before that, I did a lot of other programming languages.

  • I did some tickle ruby.

  • I did a lot of peace equal.

  • Uh, but now it's all new.

  • So and I am a really big fan of note and everything.

  • All the libraries that make that are added on top of the jobs language, which itself is very flexible, and it can do whatever you want it to do.

  • S O If you want to see the stuff that I do.

  • I put wings here, feature links on this website, and also I publish everything I deal in Jay's complete dot com.

  • So there are video courses, books, interactive labs and a lot more just complete dot com, by the way, is a node project.

  • So this is written in note and react on the front.

  • And, um so I have been hacking on this platform, and it's really fun.

  • So no, no, does not is really funny.

  • Well, at least for me.

  • Uh, so let me set some expectations about the class today before we begin.

  • So this is not going to make you an expert on note that this is just your first step.

  • So just to get you familiar to raise your confidence in the platform and to get you started on the right path to learning, though, because I think ah, lot of people learn node the wrong way.

  • They focus on the packages that comes with no door like the third party packages that are very useful.

  • But I think there is a big benefit into learning the internal, You know, the raw running time before you go and use the packages.

  • And that knowledge is gonna make you make you use of those packages much better.

  • So the one thing that you need for sure is you need no eso.

  • So if you have a node version of me, make this a little bit bigger.

  • If you have a nude version that is 10 or higher, you're fine.

  • I think it will be fine, too.

  • But if you have an older note version, so go ahead and install Note.

  • I encourage you to always experiment with the latest and greatest always have the at least the latest lt s release.

  • But I actually do my development on the cunt version, even if it's an odd number.

  • His odd number, they're not gonna be lt s s o The way this works is even numbers are lt s which is long term support.

  • Odd numbers are not so right now we don't have any odd numbers.

  • This is an even number, but it's not lt s yet it goes into lt s maybe in a few months, right?

  • So lt s will become no.

  • 12 will become lt s and they start with No.

  • 13 which is not lt s it's just experimental.

  • But I always tried to have the latest node s so that you get to start exploring the new features that come the language and so that you you detect problems going away.

  • Because once you have the latest, if you're using something that is deprecate ID, you're gonna get warnings, and it's just so much better overall.

  • But definitely you have to test your systems on the lt s That is that you're gonna use in production.

  • Right?

  • So, uh, for example, just complete that Tom is running right now on this.

  • Lt s So even though I developed on my ad features on 12 440 if I have it, I still locally I still switch things, do the lt s and test things on.

  • Lt s just give the whole system ago on the lt s before releasing a big release s o.

  • There are tools for you to switch around, eh?

  • So if you're on Mac, you should definitely have homebrew.

  • Home brew is just the best way to, um to this one.

  • The missing package manager from note The best way to install note.

  • And it still many other packages around North But there's also, uh, MGM, so envy em and there's a version for it for Windows as well is no diversion manager.

  • So if you have envy em install, you can install note, and you can install different versions of note, and you can switch between these versions with the press.

  • If it meant.

  • So you get to experiment with many versions of off note, and that's that's great.

  • So what is what is known exactly?

  • So when you have the node command, when you install note, you get three commands.

  • You get the note command, you get me on PM command and you get the MP excrement.

  • All of these comes built in with them.

  • So no is a wrapper around the eight.

  • So v eight, If you're not familiar with the eight, the eight is the Java script engine, Not the juice.

  • The Java script engine.

  • Ah man, the A Java script, the Java script engine that powers crew itself.

  • So I am in crime right now.

  • And if I go in here and open up the council and put in any JavaScript the math at random, for example, this is a Java script function.

  • This is a job from Standard Library and Grown just executed that Java script.

  • It did that through the eight.

  • So they extracted everything Java script from Chrome into this V eight engine.

  • And, of course, every browser has its engine a different agent, so I e has chakra.

  • There's chakra.

  • There's Spider Monkey, and, uh, and a few of them.

  • Now this is different than executing a browser FBI.

  • So, for example, if I do document dot get element by I d right and or get element by whatever, uh, that is that is Dom a p I.

  • That has nothing to do with Java script it just have a job.

  • A script.

  • Intervene.

  • So the this is a job script object document is Jonah Strip object.

  • Get element by i.

  • D is a a p I on that object.

  • Same thing for things like set timer set time outs that interval.

  • These air just functions that gives you access to the browser, FBI, these air not Java script.

  • So set time is not implemented by V eight.

  • It's implemented by the browser itself.

  • So when you get the browser, you have two things.

  • You have V eight that runs everything Javascript and you have the browser itself that runs everything.

  • Dom and scrolling, for example, handles, scrolling, handle, re sizing.

  • All of these events are coming from the browsers.

  • But here's the thing.

  • Everything runs in a single thread.

  • So if you have a big giant for looping here, that takes for a 1,000,000,000 times that Luke is gonna block the browser from doing things like scrolling.

  • So if if the four loop is running in the background, the user cannot scroll your page.

  • So it is important for you to understand that this is a single threaded environment.

  • However, the browser gives you, uh, a p I a synchronous ap eyes to do things a ching earnestly so that you don't have to block a single thread that you have.

  • The exact same story is in note, so note.

  • Just like the browser is also a wrapper around V eight.

  • So you get to execute S O.

  • If we have the note command, just type in the no command note and you get into this mode that we call rappel mode running Val print Luke and its exact same mode that you get when you open the browsers.

  • Consul.

  • This is also a rappel moat eso in here.

  • You can just do math at random math at random and you get exacting.

  • Think so.

  • This is through note.

  • Right?

  • But note really, really didn't do anything here.

  • No, just past this command to V eight and VH executed math at random.

  • Veet told knowed what the result of math random is and notes printed it to our screen right here.

  • So it's going back and forth between node and M V.

  • Eight.

  • So the question is, why can't we just use the eight directly?

  • You can, of course.

  • But no, it comes with a lot of other benefits around the core Standard library, Right?

  • For example, there is, Let's say, uh, actually to be server, you can just start using an S T to be servers.

  • There's a package here called actually to be, and it gives you access to starting and asked you to be server and just like actually to be, there is a lot of them.

  • In fact, let's take a look at all of them right away.

  • So I'd like to point your attention to a very, very important key on your keyboard.

  • Ready?

  • It is the tab key, which is ah, above the caps lock.

  • This tacky is important because of the discovery ability it gives you discover, discover, ability, powers.

  • So, for example, if you are a ray is a Java script class, right, and it has many methods.

  • If you can't double tab on a ray dot so just do a ray dot and double tap.

  • You get everything that available on Ray.

  • This is This is a great discovery ability because I don't have to look up the things that you can do, especially if you have an object like a mystery object that you don't know what it is, right?

  • So if you have give you em and you don't know what em EZ, you can just see all the methods that you can do.

  • Look that look like Emma's Honore, because I get to join and split and keys and supplies in reverse so it isn't really everything I can do.

  • And if you double tap on an empty screen on an empty line, you get everything that you can start with.

  • So all the Java script classes you'll see here all the Java script classes because you know it's a wraparound job script, but also get everything that is note.

  • So you see, actually to be asked me to be s everything that starts with a lower case letter.

  • Most of the things that start with a lower case letter here O r built in note.

  • So libraries that just come with note you don't have to install them.

  • Those are things that you can just start using.

  • Eso no, is not a product from Cru Node is an open source community managed project.

  • But it uses a product from Google, which is the eight.

  • So v eight is Google.

  • Google manages the eight and node uses the eight and it uses other stuff, not just the eight.

  • For example, it uses open SSL uh, on a few other libraries like that.

  • Also, you can use node with other V ems so you don't have to.

  • So there's a new experiment or a project where you can use note with chakra, which is the chakra core v i e.

  • Thing.

  • You know the powers I ej s o.

  • You can run note without the eight with using chopper record, but by default.

  • When you don't know, you get the note that's wrapped around V eight.

  • Okay, cool.

  • So this list here is really important.

  • In fact, I would say, If you want a master note, you have to learn every single item on this list.

  • I still I'm still learning new stuff because a new stuff comes all the time.

  • But most of this stuff is JavaScript.

  • So if you are not familiar with things like date function, not a number errors objects reflect simple.

  • These are JavaScript things.

  • Week map.

  • Modern Java script.

  • Right, um buffers, Ray integers, ray floats, ray map promise, regular expressions.

  • Weeks at all of these are modern Java script that you get to use out of the box with notes and the other stuff that I'd like to point out to the things that we will explore today.

  • We So counsel is, is the same library that the same object that you have in your in your browser's council and they try to mirror the exact same interface for in note.

  • But counsel is note.

  • It's not V eight.

  • It's written in note on It's in the browser.

  • It's not V eight.

  • It's the browser itself.

  • So today we're gonna talk about console we're gonna talk about the module object will mention path will mention timers.

  • We're gonna talk about timers in general.

  • Uh, we're also going to talk about actually to be maybe a little bit of net s.

  • So there's a question.

  • What is mpm?

  • How is it related to note?

  • We're gonna talk about that.

  • So you're running node Js on shell on Mac.

  • What?

  • I should run on Windows Command Prompt.

  • Yeah.

  • So, on Linda's, you can run the cmd.

  • I would recommend that you instead of CMG that you install power shell eso power shell by in Microsoft is just a much better terminal than CMD.

  • And by the way, there is a new terminal coming to windows.

  • Who?

  • That is gonna be much better, right?

  • But power shell is the way to give for now.

  • What is the i d toll?

  • Too cold?

  • The idea either I'm gonna use is called V s code.

  • So, um, is probably, uh, the most popular editor.

  • Um, so if you will not run anything on, we're gonna We're gonna use it today, and I would recommend that you use it.

  • In fact, on Windows V s good will give you a better terminal so you can use the terminal in V s good instead of using, you know, the command prompt or anything.

  • All right, What is I turn to?

  • So I turn to is just a replacement for the built in terminal.

  • Um, it's just a little bit better than the build Internal has better team monks integration, but you don't have to use it, but you put it on your list.

  • Explore it.

  • If you if you see note, is not a recognised command, that means you have to fix the path.

  • So you have to put the node that was installed in the path.

  • So we talked a little bit about node.

  • Rebel right note also is a command line tool.

  • So if you do know Dash H, you get everything that you can do in node as a command line to Lucy, Ally of known.

  • So this is This is the seal I that's going to run a script in general, but also you can use it with other options so you'll see they use each year note options, and then you give it a script if you want it to run a script.

  • Another another usage is no.

  • The inspector will talk about that.

  • Have to inspect a square in note on all of these options.

  • Just scan through them.

  • They're handy.

  • I'd like to point out one particularly, uh, or a few particularly helpful options.

  • If you want to check the Centex of a nude file and not run it, just check the Semtex desks.

  • See if you want to execute.

  • Don't use e used P because P is executed and print s.

  • Oh, sure.

  • Let's, uh, let's explore that.

  • So if I have no dash B and you just give it any JavaScript and it will execute it and print it right away so that P is for print handy to just do things really quick on you and the other one that I'd like to point your attention to is V eight options the eight options.

  • So if you do dash dash V eight options, what you get is a big list of, uh, all the options that note can pass to V eight.

  • So let's let's explore that I'm gonna pipe it unless so that we get it.

  • Peach pie, peach.

  • So V eight options.

  • So in here you're gonna see a lot of things right.

  • You're going to see Harmony Flags.

  • You're going to see tracing flags and this list of, like, 400 or 500 options that you can do and and these are options that note passed directly to the eight s O.

  • If you wanna change the way the eight behaves, change the A little optimization off the way the eight behaves or or change some experimental flags, right?

  • If you want to experiment with Webber simply right here, there's a flags represent plea.

  • So most of these options are actually advanced.

  • I just want you to know of them s so you can come to these options and search if you're if you're looking to do partake some something particular with with V eight like something advanced.