Programmer Flashcards

1
Q

3 virtues of a programmer

A

Laziness - wants to automate things to reduce energy expenditure
Impatience - create programs that anticipate needs
Hubris - wants to write programs people won’t criticize

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

Command line - cat

A

combine and print. (cat test1.txt test2.txt > test12.txt)

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

Command line - ls

A

lists contents

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

Command line - pwd

A

print working directory

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

Command line - touch

A

create file / change recently accessed

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

Command line - mv

A

rename files

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

Command line - rm

A

remove file

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

Command line - cp

A

copy file

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

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

A

A global that provides info about the current Node.js process

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

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

A

It is accessed globally

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

Data type of process.argv in Node.js?

A

Array

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

What happens when you add dependency with npm?

A
  1. It gets downloaded

2. It gets added to the dependency list

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

What is NPM?

A

Software registry (website, CLI, the registry)

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

How to create package.json in npm?

A

npm init –yes

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

How to add a dependency to a package?

A

npm install [package-name]

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