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.
How do you import functionality into a Node.js module from another Node.js module?
(node-require)
You use the require function.
What is the JavaScript Event Loop?
(the-event-loop)
When the JavaScript call stack is empty, the Event Loop pushes completed Asynchronous requests from the callback queue onto the top of the call stack.
What is different between “blocking” and “non-blocking” with respect to how code is executed?
(the-event-loop)
Blocking means no other code can run before the current call is in effect (Synchronous). non-blocking means the code being executed doesn’t stop other code from running (Asynchronous).
What is JavaScript’s runtime’s language?
c++
What is a client?
(http-messages-recap)
It’s a program that is requesting access to a server
What is a server?
(http-messages-recap)
A program that provides functionality to to clients
Which HTTP method does a browser issue to a web server when you visit a URL?
(http-messages-recap)
GET request.
What is on the first line of an HTTP request message?
(http-messages-recap)
HTTP method, target, and protocol version.
What is on the first line of an HTTP response message?
(http-messages-recap)
HTTP version, status code, status message.
What are HTTP headers?
(http-messages-recap)
Meta data about the request or response.
Is a body required for a valid HTTP message?
(http-messages-recap)
Nope.
What does the verbose command do?
Tells you where that command is if it exists.