reading notes for code fellows
Node is a JavaScript runtime built using Google Chrome’s V8 JavaScript engine, meaning that it can be used to execute JavaScript on the computer rather than in the browser. It can be installed using npm, which allows you to install multiple versions of Node and switch between them, which means you can set the version of Node on a project-by-project basis and circumvent potential permission issues. Node has excellent support for modern JavaScript, and since you’re only targeting a single runtime, you can write in the latest syntax and you usually will not have to worry about combatability. When working with node, your code will has a directory called node_modules where it saves lodash and any dependancies. package.json informs anyone who uses your code of any dependancies it has - such as lodash - and having them saved in that file allows them all to be retrieved when the user runs npm install.
One of the major uses of Node and npm is automating the process of developing a modern JavaScript application through installing major frameworks like React or Angular and creating an environment in which they can run properly. Node also allows us to run JavaScript on the server. In other servers and languages, every time there is a new request it spawns a new thread, bogging down the execution of previous requests and causing potential issues with the site, but Node is single-threaded and event-driven, which means that everything happening in Node is a reaction to an event. This execution model causes little overhead in the server and makes it more capable of handling a large number of connections. As a downside to this, there are a few limitations, such as the fact that you shouldn’t block I/O calls and CPU-intensive operations should be handed off.
Node is best suited to applications that require real-time interaction, like chat sites, or building APIs with lots of I/O driven requests. Some of the advantages of Node include the fact that its fast, can use JavaScript on a server, and allows you to do everything in the same language rather than bouncing around. It also can read JSON, which is an important data exchange format.
Pair programming usually involves two people, one to write the code, the Driver, and one to guide where the code is going, the Navigator. The Navigator is there to think about the big picture while the Driver thinks about the mechanics of it all.
When learning a new language, the important things are listening, speaking, reading, and writing. Pair programming hits all four of these skills, and is great training for moving into the workforce. It helps you achieve
I’d like to know a bit more about what I/O requests are.