Blog_Post 304

Callbacks on callbacks nested in callbacks ect… Just a lot of callback functions with code in those callbacks that other callbacks are dependent on. Promises are one answer when it comes to asynchronous processes. Planning out the framework of your project ahead of time can also keep you from falling into the callback trap.

Stubs are used to test, debug or build code, but are not meant for the final product. If you are running code that has high latency or there is a vital connection you temporarily cannot connect to, you can place a stub in your code to appease your codes dependencies, so you can troubleshoot.

It’s not just node JS. Think of “streaming” sites like Youtube or Netflix. They send small chunks of data at a time, rather than the whole video all at once. A file can also be larger than what memory you have available, and streaming helps solve this issue as well.

Method chaining requires you to return an object (a reference to) containing the next method to call.

Node.js console is a global object and is used to print different levels of messages to stdout and stderr. There are built-in methods to be used for printing informational, warning, and error messages.

It is used in synchronous way when the destination is a file or a terminal and in asynchronous way when the destination is a pipe.

https://www.tutorialspoint.com/nodejs/nodejs_console.htm

https://node.readthedocs.io/en/latest/api/process/

A clustered index defines the order in which data is physically stored in a table.

A non-clustered index doesn’t sort the physical data inside the table. In fact, a non-clustered index is stored at one place and table data is stored in another place.

https://www.sqlshack.com/what-is-the-difference-between-clustered-and-non-clustered-indexes-in-sql-server/

There can be 4 different types of user-defined functions, they are:

  1. Function with no arguments and a return value
  2. Function with arguments and no return value
  3. Function with arguments and a return value

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store