Categories
Notes
Original post
https://javascript.plainenglish.io/how-to-do-multithreading-with-node-js-207aabdaddfb
Features
Each thread has separate v8 engines.
Child threads could communicate with each other.
Child threads could share the same memory.
An initial value could be passed as an option while starting the new thread.
Use case, we want to know how much time an element has been visible. For example, an ad before refresh.
Adding an extra level of security is increasingly important to avoid our data from being stolen. Using two factor authentication is a simple yet effective way to accomplish this goal.
Requiring a schema to validate JSON data is a common task.
Usually, you start by simply sending the data to the service. As more data is added, one day dealing with data complexity turns out to be difficult.
So, validating that the data is as expected turns out mandatory.
The simplest way to come up with a first schema to be used for validation is to generate it based on json data.
In this post I present two tools that helps pull off this task very easly.
UI Frameworks like bootstrap, material design, tailwindcss come with a lot of CSS helper classes to enable you with flexibility in the design of which you end up using only a small fraction. At the time of creating the production file you end up with big files that slow down your pages loading and degrade the user experience.
Getting rid of all css classes that are not used is a simple way to optimize your pages performance.
Keeping your javascripts light is something pressured by UX requirements. Pages with big javascripts tend to load slowly, on the other hand for a provider is difficult to know in advance what tools to include because they are known only when the script is run.
Having unique ids is a frequent need. Sometimes using a database can help on this but at the cost of speed. Here are a few faster alternatives.
Free api is an option.
Some examples of solving problem using functional programming style.
Creating a Multidimensional array in javascript.