Command Line Programming Flashcards

1
Q

What is a CLI?

A

Command Line Interface

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

What is a GUI?

A

Graphical User Interface

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 - opens manual for command
Cat - to see the contents of a file
Ls - lists contents of directories 
Pwd - shows present working directory 
Echo - displays line of text (terminal console log)
Touch - changes the files time stamps 
Mkdir - makes a directory 
Mv - to rename a directory or move things 
Rm - remove files or directories 
Cp - to copy
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, Hubris

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

What is Webpack?

A

A dev dependency that allows you to bundle your JavaScript files

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

How do you add a devDependency to a package?

A

Npm install —save-dev “package”

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

What is an NPM script?

A

A CLI shortcut for a program to run.

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

How do you execute Webpack with npm run?

A

Npm run keyword

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

What is NPM?

A
  1. The worlds largest software registry
  2. Open source program for coders to share code
  3. CLI
  4. The registry
  5. The website
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a package?

A

A directory with files and package.json

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

How can you create a package.json with npm?

A

With npm init —yes command

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

What is a dependency and how do you add one to a package?

A

Dependencies are other packages that your package relies on, you can add one with the npm install command

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

What happens when you add a dependency to a package with npm?

A

It adds it to the JSON file and creates a node_modules directory

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

What is the difference between a dependency and a devDependency?

A

dependencies are for production, devDependencies are for development and to build/code check

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