Don't wanna be here? Send us removal request.
Text
Unusable state : Azure Batch Node
In one of my recent project we are using the Azure batch node for High performance computing. The azure batch runs Thousands of samples and generate the report in different forms. Recently we faced one strange issue of The Azure batch node become unusable and the weird part is there is no error message on Azure portal as mentioned in there documents. So here are some of the debugging steps,…
0 notes
Text
Overloading in Javascript
The Javascript supports Object oriented programming, and polymorphism is an awesome concept of it. The polymorphism can be implemented using method overloading and overriding. The method overriding can be implemented through Inheritance which we will discuss later. The method overloading implementation is trickier in Javascript, let’s see why – class Shape{ draw(r){ console.log("Drawing circle…
0 notes
Text
Immutabilitty in JS
We can create immutable objects in javascript, There are different ways to do that, here we will discuss about the Object.freeze method which makes all the properties as configurable and writable as false. var iceCream = { flavour:”vanilla”, weight:”20g”} Object.freeze(iceCream); iceCream.flavour=”Strawberry”; // No error even it is freeze console.log(iceCream.flavour); // “vanilla” In the…
0 notes
Text
Supercharge Your JavaScript with Higher-Order Functions!”
The Javascript functions are first class object, what does it means ? It means the functions can be treated as objects like – It can be assigned to a variable It can be passed as parameter It can be returned as parameter. properties and methods can be added to them. So the if these first class objects are passed as parameter to a function or returned as value from that function then that…
0 notes
Text
Pure and Impure functions in Javascript
Here we are discussing about the pure and impure function in functional programming concepts of javascript. The pure functions returns which always returns the expected result and it is not dependent on any external factor. function sqrt(num){ return num ** 0.5 } console.log(sqrt(4)==2); // expected true In the above function if we pass any number to sqrt function it will always return square…
0 notes
Text
Understanding Array Length in JS
Sometimes JavaScript presents us with peculiar questions, such as those related to array length. In JavaScript, array objects are 0-based, similar to other programming languages. For instance, when you create an array, the first element is at index 0, the second at index 1, and so on. Let’s take a look at the example below. – var shapes = []; shapes[100] = 1; console.log(shapes.length) //…
0 notes
Text
Demystify the Usage of Nullish Coalescing
The Nullish Coalescing operator (??) is a logical operator and it is used for handling the null or undefined values specifically. If the left operand is null or undefined then it is assigning the right operand value to the variable. let a; const message = a ?? "Hello"; console.log(message);// expected output is "Hello" let b=null; const greet = b ?? "Good morning"; console.log(greet);//…
0 notes
Text
Intercepting JS Objects
There are numerous libraries that provide object interception to enhance object functionality and output. In vanilla JavaScript, this can be achieved using the Proxy object. The Proxy object allows for the interception and redefinition of JavaScript objects. It can be used to create decorated objects with additional functionalities. For example, let’s consider a hypothetical scenario where the…
0 notes
Text
Enforcing Best Practices for Object Creation in JavaScript
Every developer has unique thought processes, and occasionally, human error can lead to application failures. In our development environment, it’s crucial to enforce standards for custom libraries and reusable code to maintain consistency and reliability. For instance, we need to ensure that users create an object of our JavaScript function rather than calling the function directly. The…
0 notes
Text
Type conversion using unary operator
I recently come across with a question that “What is the difference between Number function and unary operator type conversion. In Javascript usually if you know that the given String having exactly a number and you want to parse it from String to number you can use any of these methods – Unary operator(+) Number function ( not the object) parseInt function The unary operator / Number…
0 notes
Text
"Pool Destroyed" lets fix this :)
“Pool Destroyed” lets fix this :)
I am using MEAN stack to develop my current application. We are using Micro-service architecture with NodeJS as core stack, Few days back me and my team started noticing the “pool destroyed” error in random scenarios. We started searching on internet for the solutions, but finally we found the solution by reading the Mongoose library code and analyzing the MongoDB logs (once got access from…
View On WordPress
1 note
·
View note