reading-notes

reading notes for code fellows


Project maintained by dLeigh01 Hosted on GitHub Pages — Theme by mattgraham

NODE.JS

What is Node and When Should I Use It?

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.

  1. Node.js is a JavaScript runtime.
  2. The V8 engine is an open source software that alllows devs to use it to create other things that will work with the browser or outside of it.
  3. It means that it can run JavaScript alongside everything needed for it to work.
  4. Npm is ‘Node Package Manager”, it allows you to control what version of Node is running with your code and install dependancies for projects.
  5. 16.15.0
  6. 8.5.5
  7. npm install jshint
  8. Node is used to build applications in JavaScript.

6 Reasons for Pair Programming

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

  1. The six reasons for pair programming are greater efficiency, engaged collaboration, learning from fellow students, social skills, job interview readiness, and work environment readiness.
  2. I think the thing I have found the most beneficial so far has been social skills.
  3. Pair programming involves one person working as the Driver and actually typing all the code, while the other works as the Navigator and tells them what to do.

Things I Want to Know More About

I’d like to know a bit more about what I/O requests are.

[< table of contents]

[< home]