Photo by Naassom Azevedo on Unsplash
  1. Save First. Practice Expense = Earning — Saving rather than Saving = Earning — Expense. The subtle difference is as soon as you get your salary or earning, deduct some part(start with 10%) and use the rest for spending. This deducted part should be your saving. The point is to develop a habit of saving first and then spending rather than spending first and calling left over a saving(Trust me, nothing is left to save if you follow it!!)
  2. Invest in yourself. Cultivate three traits Integrity, Intelligence & Energy. Have role models for yourself and read as much as you…

Newspaper cutting of hindustan times on 15th aug 1947
Newspaper cutting of hindustan times on 15th aug 1947

In Aug 1947, two nations born, one Pakistan on 14th Aug, 1947 and other India on 15th Aug, 1947. A single nation divided into two on basis of religion and since then has a decorated history.

But this post is about how these nations got independence and giving some credit of independence to a factor which is not much discussed or talked about.

Before starting, Lets discuss a bit about colonization or colonisation, It is the process of claiming and establishing colonies(A colony is a territory subject to a form of foreign rule.). Modern colinization refers mostly to Western European…

  1. Bundle Umd to target all platforms(node/browser and amd/require/es6 module) but tree shaking don’t work.
  2. Bundle cjs and esm packages as separate modules.
  3. Point “main” in package json to cjs build index file.
  4. Point “module” in package json to esm build index file.
  5. While 4 and 5 are sufficient you can go one step further and expose individual modules too.
  6. Use rollup for bundling libs, it’s effective than webpack.
  7. Mocha and Istanbul works with cjs files so you have to compile your code to cjs modules for unit testing & coverage. You can use Babel or Esm for this. I preferred…

Ramda JS Logo
Ramda JS Logo

How to read a property from and object and use a fallback if its missing ?

// instead of implementing like below
// const fn = (defVal, propName, obj) => (obj && obj[propName]) || defVal;
// console.log(fn(-1, 'a', {})) // -1
// console.log(fn(-1, 'a', { a: 100 })) // 100
console.log(propOr(-1, 'a', {})) // -1
console.log(propOr(-1, 'a', { a: 100 })) // 100

How to read deeply nested property ?

const obj = {
a: {
b: {
c: 1

While we are fighting this pandemic, it gives me opportunity to share my journey so far with Vue. I have decided to write a daily note on Vue and share my experience so far. Will take one step at a time.

Vue is one of the leading front end framework to develop web applications. Other leading front end frameworks are react, angular & svelte.

So in this we will look into what is declarative rendering in vue ?

// html template
<div id=’app’>{{name}}</div>
// JS code
const Name = {
name: ‘nameComponent’,
data: {…


What is Reactive Programming ?

In computing, reactive programming is a declarative programming paradigm concerned with data streams and the propagation of change. With this paradigm it is possible to express static (e.g., arrays) or dynamic (e.g., event emitters) data streams with ease, and also communicate that an inferred dependency within the associated execution model exists, which facilitates the automatic propagation of the changed data flow.

What is Observable ?

A datatype to rule over everything ;-)

MeaningLess Example

Log the first 10 clicks on the right side of window.


let clicks = 0;
const clickHandler = e => {
const { innerWidth: width } = window;
const {…

Why should i learn Functional Programming

Imho, It changes the way you think and write program for greater good. So, give it a try and keep it simple. Fwiw, You may get lost on the roads of learning FP as it traces its roots with category theory and the ability to reason with the program using mathematical expressions. But if you can keep it simple and and move one step at a time, i think it’s worth it.

First Class Functions

It meant a function

  1. Can be stored in variable, object or array.
  2. Can be passed to function as an argument.
  3. Can be returned by the function.

Storing function…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store