Simulating race conditions to understand challenges of multithreading (Golang)
I’m writing this post to better understand the challenges of using the multi-threading model of concurrency. I’m using Go to simulate a multi-threaded processing scenario. In Golang the
The following code is written to highlight the challenge of asynchronous execution inside for loops using code snippets in Golang and Nodejs In Golang
While writing a blog post on Bitmasks I realized my current mental model of how the NOT operator works is flawed. I expected the NOT operator to flip the...
One of the problems I attempted on HackerRank had an elegant solution using bitmasks. I don’t remember the problem any more, but I do remember struggling with binary calculations in...
I have been coming across the term ‘Web Assembly’ rather often while browsing HackerNews. I have no idea what it is but from reading off the comments I gather, it’s...
I recently watched this talk Scaling Nodejs beyond ordinary made by Abhinav Rastogi at JSConf Iceland. The talk is given by the Lead UI Engineer of Flipkart, which is...
Code var util = require('util'); function Person() { this.firstName
Using util.inherits Readable object gets access to all the properties and methods defined on the prototype property of ‘Stream’ function constructor. Node.js source code (lib -> _stream_readable.js)
How util.inherits works? Node.js source code (lib -> util.js -> exports.inherits) exports.inherits = function(ctor, superCtor)...
While taking a course that explained some of the under-the-hood features of Node.js, I attempted to read the source code myself. While I’m a long way from understanding the code,...
Object Literal Syntax var obj = { prop1: 1, prop2: 2, method1
When a property or a method of an object is referenced in JavaScript, the JS engine looks for it within the object and along the prototype chain. Now what is...
=== compares both the data and the type and returns true only if both the data and the type are match == coerces if the data...
Code var a = 10; var b; let c = 20; let...
I was learning to implement a Linked List where in I got confused about how objects are passed by reference in JavaScript. Skip to experiment section Problem
function memoize(fn) { var cache = {}; return function(...args) {...
When I started learning HTML and CSS, for quite a while I felt overwhelmed by all the different tags, attributes, elements, and style options. Without a framework to divide the...
In case of variables var a = "This should print"; console.log(a); console
Reference Problem - https://www.hackerrank.com/challenges/apple-and-orange/problem I attempted the above problem and used higher order functions to understand closures better. The top submission for this problem uses a simple for loop. Clearly...
Asynchronous execution inside for loops (Golang and Nodejs)
What's in a URL?
How bitwise NOT works in JavaScript?
Using Bitmasks and Binary operations in JavaScript
What is Web Assembly?
[Reference] JS Conf Talk - Scaling Nodejs beyond ordinary
Reading Nodejs source code - How fn.call and util.inherits are used to extend Prototypal Chain?
Reading Nodejs source code - Using fn.call to inherit properties and methods from other constructor functions?
Reading Nodejs source code - How util.inherits affects the prototypal chain?
Reading Node.js source code - How to?
What are the different ways to create an object?
What is Prototypal Inheritance?
Difference between == and ===?
Difference between var and let
How does Pass by Reference work for objects in JavaScript?
Writing a generic memoize function in JavaScript
How to deconstruct a website's front end for learning?
Experiments with Hoisting in JavaScript
Higher Order functions to abstract out duplicate code and make it extensible