Full Stack Developer

  • with the focus on Front End Technologies.
  • Podcast addict.
  • Aspiring stoic.

Debug express typescript projects in VS Code with watch and live reload

VS Code set up to live reload individual typescript based express apps within single repo With the advent of micro services, Many set ups have emerged to take an advantage of individual app development and deployment while sharing code between the apps. There are more than one way to approach it but the monorepo setup is the most common and most widely adopted solution to manage individually versioned apps into a single repository. [Read More]

Promises and Microtask queue

Promises execution order Before we dive deep into promises execution order, try to figure out the output of the following piece of code. console.log("Hello there"); setTimeout(function () { console.log('Hello - setTimeout'); }, 0); Promise.resolve() .then(function () { console.log('Hello - Promise 1 resolved'); }) .then(function () { console.log('Hello - Promise 2 resolved'); }); console.log("Good Bye"); The answer is Hello there Good Bye Promise 1 resolved Promise 2 resolved Hello - setTimeout Ever wondered how the javascript execution context decided to come up with this execution order? [Read More]

Mixin class in Typescript - The Good? bad? ugly?

What is mixin? Typescript introduced mixin pattern via mixin classes with this push Wikipedia defines mixin as followed Mixin programming is a style of software development, in which units of functionality are created in a class and then mixed in with other classes. Mixin is a composition pattern where a unit of functionality is injected in a class by a wrapper function or an object. In the typescript world, it usually contains a small class with a single behavior that wraps another class to extend the functionality or behavior. [Read More]

Book Review: Talking to Strangers

Or what we should know about building software for people we don't know.

Book Summary: Talking to Strangers Software construction, or any knowledge work which involves formulating something concrete out of loosely defined abstract ideas, is perhaps the most difficult endeavour for a software team. Most of the times, the final product fails to deliver and the scope creeps are frequent because a squad including product owner, software developers and everyone, thinks they understood what this user aka complete stranger wants but rarely is the case. [Read More]

Asynchronous operation in Javascript: Async/Await

Asynchronous programming with Async/Await: This is the second post in the multi part series about understanding and using async/await. The second part tries to cover the asynchronous programming using async/await. Simple asynchronous function using Promise Imagine a piece of functionality that fetches the data and based on the returned result it get has to decide weather to get more information or return the current result const simpleRequest = () => { return getSomeData() . [Read More]

Javascript Generators - 1: Introduction

Why we need Generators ? You may already know from /posts/2017-02-02-event-loop/ that that Javascript has an unique take on asynchronous processing and it’s never been easy to write clean succinct async code. Initially there were call backs. Need something to happen outside of execution context of javascript eventloop ? just use setTimeout and pass your callback function. Soon enough, people started abusing( and no mistake of their own as there wasn’t any alternative ) callbacks and turned it into a call back hell. [Read More]

Event Loop in JavaScript

Javascript's take on asynchronosity

What is Event Loop and why we need it ? There was a time when hardware resources were expensive, like “you can go broke” expensive. Developers had to manually manage the memory and do bunch of other stuff, which we take for granted today, to make sure the system works in that tiny resource requirement. People used to land on moon for 4kb-of-memory( Today you can’t even load that viral meme for that much ). [Read More]