Backend Flashcards
What is a CLI?
(command-line-basics)
CLI stands for Command Line Interface. For developer;
What is a GUI?
(command-line-basics)
GUI stands for Graphical User Interface. For consumers; that has icons and click based.
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
(command-line-basics)
man - Basically a manual.
cat - Prints the content of the file to the terminal.
ls - Prints the list of contents in the directory of your choosing.
pwd - Prints the path of the current working directory.
echo - Prints a line of text, contents of a file, or allows you to put text into a file.
touch - Changes a file’s timestamp and also allows you to create files.
mkdir - Makes a directory.
mv - Moves or renames a file.
rm - Removes a directory and/or file(s).
cp - Copies file(s) or directories.
What are the three virtues of a great programmer?
(command-line-basics)
laziness, Impatience, Hubris.
What is Node.js?
(node-intro)
It is a program that allows JavaScript to run outside of a web browser.
What can Node.js be used for?
(node-intro)
For building scalable network applications.
What is a REPL?
(node-intro)
Read Evaluate Print Loop
When was Node.js created?
(node-intro)
May 27, 2009
What back end languages have you heard of?
(node-intro)
Python, typescript, Ruby, PHP, Node.js, C#, go, haskell, assembly, sql, java, perl
What is a runtime?
Executed code that you didn’t type yourself.
(the browser, timers, etc.)
What’s the difference between a library and a framework
Inversion of control
(If you define a function without calling it and instead hand it over to a library that you’re using, then that is a framework). DOM events are a framework.
What is forking?
The ability for programs to split off and start other programs.
What is a computer process?
(node-process)
The instance of a computer program that is being executed by one or many threads.
Roughly how many computer processes are running on your host operating system (Task Manager or Activity Monitor)?
(node-process)
Over 300.
Why should a full stack Web developer know that computer processes exist?
(node-process)
As developers it’s important to be aware of whether or not a process is happening.
What is the process object in a Node.js program?
(node-process-argv)
It is a global object of node.
How do you access the process object in a Node.js program?
(node-process-argv)
console.log or call process.env
.
What is the data type of process.argv in Node.js?
(node-process-argv)
A string array, or an array of strings.
What does ctrl+C do while in Node?
if you’re in the middle of a line of code, it goes to the next line and node ignores that line of code. If you aren’t, it gives you a prompt to press ctrl+C or ctrl+D to exit node.
What does echo $? do?
It gives you the status code of the last process (0 for ok and 1 for error).
What is a JavaScript module?
(node-module-system)
a JavaScript file.
What values are passed into a Node.js module’s local scope?
(node-module-system)
exports, require, module, __filename, __dirname.
Give two examples of truly global variables in a Node.js program.
(node-module-system)
The process, global, and console objects.
What is the purpose of module.exports in a Node.js module?
(node-require)
It’s the instructions that allows us to use data from one module to another.