Node Flashcards

1
Q

What is a CLI?

A

CLI (command line interface) is a way for a user to see commands in a form of lines of text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is GUI?

A

GUI (graphical user interface) is a way for a user to see commands in a form of graphical icons

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is GUI?

A

GUI (graphical user interface) is a way for a user to see commands in a form of graphical icons

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Give at least one use case for each of the commands listed in this exercise.
- man
- cat
- ls
- pwd
- echo
- touch
- mkdir
- mv
- rm
- cp

A

man man (displays man manual)

cat (concatenate files and print on the standard output)

ls (to list out the contents of the directory currently being worked on)

pwd (to make sure you’re working on the correct directory)

echo (display a line of text)

touch (to create new files)

mkdir (to make a new directory)

mv (to rename a file)

rm (to delete a file)

cp (to make copies)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the three virtues of a great programmer?

A

Laziness, Impatience, and Hubris.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are 3 components of a fullstack Web architecture?

A

Presentation
Logic
Data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is Node.js?

A

A javascript runtime to build scalable network applications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What can Node.js be used for?

A

Usually to run the backend side of applications as well as servers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is REPL?

A

Reads input
Executes input
Prints input
Loops input

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

When was Node.js created ?

A

2009

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What backend languages have you heard of?

A

Python, PHP. C#, Ruby, C++ and Java

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a computer process?

A

The instance of a computer program that is being executed by one or more threads

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Roughly how many computer processes are running on your host operating system (Task Manager or Activity Monitor)?

A

A lot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Why should a full stack Web developer know that computer processes exist?

A

To be aware of what you’re executing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the process object in a Node.js program?

A

A global that provides information about, and control over, the current Node.js process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do you access the process object in a Node.js program?

A

With the variable process

16
Q

What is the data type of process.argv in Node.js?

A

An array of strings

17
Q

How do you access the command line arguments in a Node.js program?

A

Within splice(2)

18
Q

What is process.argv?

A

The process.argv property returns an array containing the command line arguments passed when the Node.js process was launched

19
Q

What is a JavaScript module?

A

A file with code

20
Q

What are the advantages of modular programming?

A

Makes it a bit easier and organized on breaking down larger problems

21
Q

In JavaScript, how do you make a function in a module available to other modules?

A

Using the Export keyword

22
Q

In JavaScript, how do you use a function from another module?

A

Using the Import keyword with curly braces if no default was exported

23
Q

What is the JavaScript Event Loop?

A

A mechanism through which the ‘calls waiting for execution’ in the callback queue/job queue can be put on the call stack

24
Q

What is different between “blocking” and “non-blocking” in respect to how code is executed?

A

Blocking executes synchronously
Non-Blocking executes asynchronously

25
Q

What is a directory?

A

A container that holds file (a.k.a foler)

26
Q

What is a relative file path?

A

The location of a file relative to the current (working) directory*

27
Q

What is an absolute file path?

A

A file that always starts at the root (always starts with a slash)

28
Q

What module does Node.js include for manipulating the file system?

A

fs file system

29
Q

What method is available in the node:fs module for reading data from a file?

A

readFile

30
Q

what is ./

A

The current directory / folder

31
Q

async arrow function

A

const name = async ( ) => { };

32
Q

What method is available in the node:fs module for writing data to a file?

A

writeFile()

33
Q

Are file operations using the fs module synchronous or asynchronous?

A

Asynchronous because file operations are slow