View on GitHub

Reading-Notes

This Repo contains all my reading notes for my Code 201 course

NODE.JS

An Introduction to Node.js

What Is Node.js?

To define Node.js we have to mention The V8 engine.

The V8 engine is a performance in mind and open source compiler, that compiles JavaScript on native machine and works with every Chromium-based web browser, this include Google Chrome, Brave, Opera, and Vivaldi.

Node.js is a software or program that is used to execute JavaScript on our computers. The Node.js took the V8 engin and enhanced it with various features, such as a file system API, an HTTP library, and a number of operating system–related utility methods.


npm

npm is another software/program, but this is the the world’s largest software registry. Through npm, which stands for (Node Package Manager), you can download many JavaScript codes.

What Is Node.js Used For?

One use is installing and running various build tools — designed to automate the process of developing a modern JavaScript application.

Bu the biggest use is, that Node.js Lets Us Run JavaScript on the Server.

In more details, when the server face an event it spawn a new thread to handle the event. However, if it face an I/O operation, it wil stop and handle the blocking I/O operations and then comes back to the event to start processing it. And if a new event happen then a new thread will be spawned. This can cause a site to fall down.

Node.js make the live of a server much easier, like when blocking I/O operation happens, it will register a callback before continuing to process the next event. Then when th server finish from the blocking I/O operation the callback function is called so the server can continue to work on it.

Node’s execution model causes the server very little overhead, and consequently it’s capable of handling a large number of simultaneous connections.

Are There Any Downsides?

There some cons to Node.js like:

What Kind of Apps Is Node.js Suited To?

Real Time Applications, is the answer. For example, chat sites, building APIs where you’re handling lots of requests that are I/O driven, or for sites involving data streaming.

What Are the Advantages of Node.js?

  1. speed and scalability.
  2. do everything in the same language.
  3. it speaks JSON.
  4. transitioning to Node development is, because JavaScript is popular.

Other Uses of Node

6 Reasons for Pair Programming

pair programming is the practice of two developers sharing a single workstation to interactively tackle a coding task together, and is one way we foster a collaborative environment while developing key industry skills.

How does pair programming work?

There are to role in pair programming, the Driver who’s mission to type the code, with all of its technicality , and is the only one doing the typing. And the other role is the Navigator, who’s mission to guid the driver and think about the big picture and what is next, the navigator might also read documentations and do researches.

What are the 6 reasons for pair programming?

  1. Greater efficiency: while pair programming might take slightly more time, it does not need that much time of recoding to fix bugs, and its quality is more higher. So it’s more efficient.

  2. Engaged collaboration: focus levels are higher in pair programming and procrastinating is way less. Also, finding solutions for problems is easier and consume less time.

  3. Learning from fellow students: every developer has special skills and techniques, and with pair programming two people can share their skills and methods and learn new tings. Also, experience students can help less experience ones.

  4. Social skills: communication is a key factor in pair programming and by this, developer can enhance their communication skills while working building quality applications.

  5. Job interview readiness: many companies expose their applicant to pair programming while in an interview, to see how they fit in their teams. So this will help you secure a position in the future.

  6. Work environment readiness: Many companies that utilize pair programing expect to train fresh hires from CS-degree programs on how they operate to actually deliver a product.

In your experience, which of these reasons have you found most beneficial?

I did not have enough experience with pair programming yet. However, it is obvious that all of the 6 are beneficial.

But, through my little experience I can say, that it did expose me to other techniques and tested my communication skills. And these are the most beneficial in my opinion.

Resources: