It was dark outside the train window, and even if you could see, all you could be seeing was snow. Houses covered in snow, roads covered in snow, cars covered in snow, and trees covered in snow. Life covered in snow.

In the months following my divorce, I preferred to be left alone to myself. The only reason I paid the extra money for a first-class ticket was to keep human contact to a minimum. This wasn’t one of those train journeys I was looking forward to. Thanks to the heavy snowing over the weekend. The train was half-empty, mostly…


Credits: Edited version of https://unsplash.com/photos/vw3Ahg4x1tY

Mastering null and undefined in JavaScript is often underrated. Because null and undefined get coerced to boolean false, developers who are new to JavaScript often getaway by treating both these values as false or not-a-good-value. But mastering how these two values mean two completely different things helps you write bug-free code instead of relying on guesswork.

(To simplify, we will use the terms variable and identifier interchangeably.)

A tale of two nothings

Both null and undefined are special non-value values to represent nothingness. …


I misheard the words of an unsung song
By a singer who was never born
To parents who never made love
On a radio that never needed power
In a house that had no walls
In a city that was never built.

I heard those words from a language
That was spoken by the people
In the dreams that were never dreamt
By a sleeper who is ever awake and shining
Blinding the light of a thousand suns.

I heard the flute made from a bamboo tree
That grew from a seed that was never sown
And the sound made by the…


Understanding functions inside out and then learning how to exploit them to write modern, clean JavaScript code is a critical skill for becoming a JavaScript ninja.

One of the often used coding patterns with functions has got a fancy name for itself: Immediately-invoked Function Expression. Or more dearly known as IIFE and pronounced as “iffy.”

Before we can understand what an IIFE is and why we need one, we need to review a few fundamental concepts around JavaScript functions quickly.

The natural function definition

Developers new to JavaScript are naturally comfortable with the following syntax when dealing with functions.

  1. Lines 1–3 define a…


I originally wrote this short story for a writing prompt on WritersDigest Forum. I am sharing it here with a few minor edits.

“You know what’s the toughest thing for the human brain to do?” he asked me after a few minutes into our casual chat.

“I don’t know. A lot of things, maybe. What are you? A neuroscientist?”

“Heck, no. I am no scientist. I am just an old man with a lot of guilt. A lot of secret burden I had been carrying from the past thirty years,” he said rather contemplatively for his lifeless face. …


Following tweet by Kyle intrigued me to write this post. The question was originally asked on reddit.

https://twitter.com/getify/status/816000834739826688

[ 1 ] + [ 1 ] - [ 1 ] = ?

First, let’s try to understand what [1] + [1] will evaluate to. Questions like these are better answered by consulting ECMAScript specification. In this case, we are interested in the specification for the + operator to begin with.

(Link to the ES6 specification for addition operator.)

The first key takeaway from the specification is:

The addition operator either performs string concatenation or numeric addition.

So, it’s obvious that + operator is overloaded in the language to work with two different primitive types string


Karma — by Alan Eng

Understanding closures and being able to use them as your second nature is an important first step towards becoming an expert JavaScript developer. Unfortunately, closures are also confusing to understand, especially for beginners. In this tutorial, we will learn them in a fun way and see some practical applications beyond academic theory. You don’t have to believe in the Laws of Karma to learn Closures :)

When I do interviews for JavaScript developers, my first question is around how they understand and use a closure. If they do not answer this question, I usually start talking about anything but JavaScript…


( I initially wrote this as a quick response to a post here. But the post was later deleted orphaning my response. So I decided to edit and post this to share my thoughts or my two cents if I have to use that cliche! )

There was a lot of drama on social media and mainstream media about India’s poor performance at the recently concluded Rio Olympics. Being the largest democracy in the world with 1.2 billion people, we ended up winning only two medals. …


When anyone baffles me with a “Why do you write?”, I actually think it’s a more civilized way of asking “Are you crazy?”

I always wanted to be a writer ever since I knew how to hold a pen. Well, that’s a plain lie. I sometimes wish how wonderful my life would be if I always knew from my childhood that I wanted to be a writer when I grow up. A writer writing in English, that is. How I secretly envy Orwell and other blessed souls.

I grew up studying in my mother tongue for the first twelve years…

Chandra Gundamaraju

For my day job @Salesforce, I write code for machines; But in my free time, I pursue this wild hobby of writing for humans. {Learn | Code | Read | Write}

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