The language Series:ย Ruby


The post discusses my experience with learning and using Ruby, highlighting its good, bad, and weird parts.

Avoid bugs by understanding hole processing in JS arrays


Avoid hard to debug bugs and flaws by truly understanding how JavaScript handles holes in arrays.

JavaScript Arrays Are Objects


JavaScript arrays show object-like behaviours in a variety of ways.

How well do you know JavaScript Arrays?


I decided to write about sparse and dense arrays several months ago. I thought it would be easy and imagined writing a masterpiece based off my multi-year experience with arrays. Alas, my foray into the intricacies of Arrays unearthed surprising discoveries and shattered my brittle expertise. This series of posts describes my learnings and Aha moments.

Why JavaScript sorts wrongly


JavaScript sort algorithm gives surprising results. Read on to learn more.

Understanding JavaScript Array methods: Unshift and Shift


Shift and Unshift are the counterparts of Push and Pop. This post provides a deep dive into their applications.

JavaScript Array Deep Dive: Push and Pop


Pushย and Popย are two popular methods for handling arrays in JavaScript; this short post explores both array methods.

Check Endianness with JavaScript


How to check for endianness using JavaScript

What you didn’t know about JSON.parse


The JSON parse function takes in a string (invalidย JSON will cause a SyntaxError exception). If parsing succeeds, JSON.parse returns the corresponding value or object.

Nope, You don’t need lodash for that


I recently had to reduce the size of an Angular Web app for performance reasons. A quick run through the webpack bundle analyzerย identified MomentJS and Lodash as the main culprits. Consequently, I had to eliminate both libraries and implement replacements in pure ES6.

Ensuring Integer results in JavaScript


One of the ways JavaScript differs from most programming languages is the absence of integer types.

Why you should not use isNaN in JavaScript


Nan literally meansย Not a Number. Yes, it means that value is not a number and occurs when you try to coerce a non-mathematical value (e.g. string) into a number.

Faking goto in JavaScript with Labeled Statements


What if I told you JavaScript had a limited form of the infamousย goto statement? Surprised? Read on.

What you didn’t know about JSON.Stringify


This post shows a couple of new tricks and ways to properly leverage the hidden capabilities of JSON.stringify covering: JSON expectations and non-serializable data formats, How to use toJSON() to define objects properly for JSON serialization, The replacer option for filtering out values dynamically, the spaceparameter for formatting JSON output. The post also covers the difference between stringifying arrays and objects containing non-stringifiable fields

JavaScript has no Else If


A surprising random fact about JavaScript is the lack of else if support

Why JavaScript has two zeros: -0 and +0


Do you know there are two valid zero representations in JavaScript?

Understanding JavaScript Property Descriptors 3


Now that we know the basics, this post covers the JavaScript methods for setting and modifying object property descriptors.

Understanding JavaScript Property Descriptors 2


Continuing with the dive into property descriptors, this post goes deeply into theย properties, what they mean and how they can be used.

Deep dive into JavaScript Property Descriptors


There are a couple of ways to assign properties to objects in JavaScript. The most common example is using obj.field = value or obj['field'] = value. Thisย approach is simpleย however, it is not flexible because it automatically defines property descriptor fields

Why I am moving to Angular 2 from AngularJS


If you are thinking of choosing between Angular 1 or Angular 2, I'll say go for Angular 2; it's totally worth it.

Book Review:Build your own AngularJS


As part of myย continuous learning; I started reading Tero Parviainen's 'Build your own AngularJS' about 6 months ago. After 6 months andย 127 commits, I am grateful I completedย the book.

Safely handling destructive loops


Simple loops can be boring, after all, why not have the collection change during a looping operation for more fun?ย 

How function spies work in JavaScript


If you write unit tests, then you likelyย use a testing framework and might have come across spies. If you don't write unit tests, please take a quick pause and promise yourself to always write tests.

Learning ES2015 : let, const and var


Lions at the zoo Zoos allow for safely viewing dangerous wild animals like lions. Lions are caged in their enclosures and can't escape its boundaries (if they did, it'd be chaos eh?). Handlers, however, can get into cages and interact with them. Like cages, you can think of variable scoping rules as establishing the boundaries and walls in … Continue reading Learning ES2015 : let, const and var

Getting Started with ES2015


A brief introduction to some of the reasons for ES2015/ES6