shivang.chaturvedi

I am a passionate coder and a blogger with almost 10 years of experience in IT industry.

MEAN, Node.js

Simple way to handle monetary data in MongoDB in a NestJs application

While building my backend NestJs application, I wanted to store some financial data. The first question I ran into was what schema Type should be for storing data where I want to maintain the data precision. Decimal128 came out to be the prescribed official candidate to store the financial data. Here’s my initial schema...

19-Aug-2023

Front End Development, MEAN

Why and how finally{…} block is NOT meaningless

A definition first (from the internet): try-catch-finally is used to handle runtime errors and prevent them from halting the execution of a program. The finally block triggers regardless of: what is implemented inside the try-catch block any errors encountered inside try-catch block any return statement written...

25-Jan-2023

MEAN, Node.js

Top level await() without async() function in NodeJs

Here’s how async-await function typically works: function myDummyBackendCall() { return new Promise((resolve) => { setTimeout(() => { resolve({ name: "Shivang", id: "asmdhajkdhajdsh8qweuqoweuiqepoi-0q-0eueiuaisjdaKcjaisku", }); }); }); } // Used an async wrapper function to make an await call (async () => { ...

24-Jan-2023

Digital Transformation, Software development

Go Pointers! Let’s talk about it…

A pointer, as name suggests, is a variable that points to a location in the memory of your system where a value is stored rather than a value itself. Basically, it is an address to the value stored in memory. The definition is simple but this concept can be a little tricky to wrap your head around. When I first developed a good...

23-Jan-2023

AWS, DevOps

Fooling around with Docker CLI commands with PostgreSQL image

Currently, I am developing a side project wherein I wanted to use Postgres as my project database using its docker image. This blog is my brain dump of the docker basics I have learned so far, and I have attempted to break down the CLI commands I used or came across during the course of development for my own better understanding. ...

14-Jan-2023