Senior Side Flashcards
(command-line-basics)
What is a CLI?
A command-line interface (CLI) processes commands to a computer program in the form of lines of text.
The program which handles the interface is called a command-line interpreter or command-line processor. Operating systems implement a command-line interface in a shell for interactive access to operating system functions or services.
(command-line-basics)
What is a GUI?
The graphical user interface (GUI) is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, instead of text-based user interfaces, typed command labels or text navigation.
(command-line-basics)
man command
is an interface to the on-line reference manuals.
(command-line-basics)
cat command
concatenate files and print on the standard output
(command-line-basics)
ls command
list all the files in a directory of what is available.
(command-line-basics)
pwd command
show which working directory that you are in.
(command-line-basics)
echo command
print. basically console.log for the terminal
(command-line-basics)
touch command
create a file into the working directory. If you touch it again, you will refresh the time stamps if the file already exists.
(command-line-basics)
mkdir command
Ability to make directories
(command-line-basics)
mv command
Ability to move and rename files
(command-line-basics)
rm command
Ability to remove files and directories
(command-line-basics)
cp command
Ability to make a copy a files and optionally specify a new name.
(command-line-basics)
What are three virtues of a good programmer
Laziness, Hubris, and Impatience - Larry Wall
(node-intro)
What is Node.js? **
As an asynchronous event-driven JavaScript runtime, Node.js is designed to build scalable network applications.
(node-intro)
What can Node.js be used for?
Can be used for APIs and asynchronous calls to the server. ability to learn client-side and server-side applications
(node-intro)
What is a REPL?
READ EVAL PRINT LOOP
example: browser console, node terminal
(node-process)
what is a computer process?
The execution of the programs that are running currently on the computer.
(node-process)
Roughly how many computer processes are running on your host server
(251 - 482 processes)
(node-process)
Why should a full stack Web Developer know that computer processes exist?
http
hypertext transfer protocol. It is the web. It’s how the client and server communicate.
(node-process-argv)
What is the process object in a Node.js program?
An object that gives you information regarding the current node.js process.
(node-process-argv)
How do you access the process object in a Node.js program?
It is a global object. You can console.log it .
(node-process-argv)
What is the data type of process.argv in Node.js?
The data type is an array
(node-module-systems)
What is a JS module?
A single JS file.
(node-module-systems)
What values are passed into a Node.js module’s local scope?
All the exports require filename and __dirname
(node-module-systems)
Give two examples of truly global variables in Node.js program.
buffer and process
(node-require)
What is the purpose of module.exports in a Node.js module?
Its a way of transporting a modular file into a main.js file. to be able to use js files as separate modules.
(node-require) How do you import functionality into a Node.js module from another Node.js module?
Declaring a const variable and a require (the module)
(the-event-loop)
What is the JS Event Loop?
JS Event Loop watches:
the stack and the callback queue
when the stack is clear and there is something on the callback queue, the event loop will push it onto the stack to get executed.
(the-event-loop)
What is different between ‘blocking’ and ‘non-blocking’ with respect to how code is executed?
Blocking code stalls the stack
Non-blocking is asynchronous, it is on the event queue
(node-fs-readfile)
What is a directory?
A directory is a special type of file that holds information about more directories and files
(node-fs-readfile)
What is a relative file path?
Path related to where you are at. (not an absolute path)
example: ./ = current directory
../node-fs-readfile/dksjt.txt (going up a directory)
(node-fs-readfile)
What is an absolute file path?
From the root, explicitly typing out the whole file path.
(node-fs-readfile) What module does Node.js include for manipulating the file system?
fs module
(node-fs-writefile) What method is available in the Node.js module for writing date to a file?
fs.write, fs.writeFile, fs.appendFile
(node-fs-writefile) Are file operations using the fs module synchronous or asynchronous?
They are both.
fs. write
fs. writeSync
(JS-and-JSON)
What is JSON?
JSON is a data interchange format. You change another data type into a ‘string’