In a previous post, we discussed how Node.js is a single-threaded environment and still manages to serve multiple requests simultaneously: Node.js event loop: concurrent processing in a single-threaded environment. This is a good way to avoid the problems that come along with multi-threading like race conditions. But this extra peace of mind comes at a … Continue reading async_hooks: behind the scenes of Node.js http request context handling
Author: Ajilal Ajayan
Why query pagination by OFFSET might be a bad idea
SELECT * FROM user LIMIT 10 OFFSET 200 ORDER BY user_id; This SQL query basically tells the database to "Skip the first 200 rows of the user table and get me the 10 rows that comes after that". If you want your database to get large without crashing your application, then you can't avoid query … Continue reading Why query pagination by OFFSET might be a bad idea
Node.js event loop: concurrent processing in a single-threaded environment
When you start a Node.js application by running node index.js, you are in fact creating a Node.js process in which your code will run. Every process has a dedicated memory pool which is shared between its threads. Or in other words, you can create a variable in one thread and read it from another. While … Continue reading Node.js event loop: concurrent processing in a single-threaded environment
Big O notation for algorithm analysis; What, why and how.
An introduction It is almost useless to write a program if it doesn't give you the result in time (Almost 🤔?? Lets face it.. Sometimes there is no choice but to use a bad algorithm till we get a good one 🤓 ). Hence, algorithm performance has huge importance in programming. We have to continuously … Continue reading Big O notation for algorithm analysis; What, why and how.
Understanding Epoch & Unix timestamps
If you are a programmer, and you have dealt with dates, you likely have heard the terms Unix epoch and Unix timestamps. The question is have you faced difficulties in dealing with timestamps for different time zones? Have you faced difficulties in grasping the whole idea of timestamps? I started using these words/values without knowing … Continue reading Understanding Epoch & Unix timestamps
Angular : Modules and lazy loading to improve loading time.
Are you a serious angular developer and ever felt that your angular app takes too much time to load initially? Then you should probably know about modules and lazy loading in angular. Here I am about to tell you why and how I implemented lazy loading in my angular app in 3 simple steps and … Continue reading Angular : Modules and lazy loading to improve loading time.
