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.
Shift and Unshift are the counterparts of Push and Pop. This post provides a deep dive into their applications.
Sometime last year I started to solve hackerrank problems at my pace and here is my progress after about 108 days ago.
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.
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.
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
You are building a web application and need the application to pause whenever the user stops interacting with the page;
Your wonderful one-of-a-kind web application just had a successful launch and your user base is rapidly growing. To keep your customers satisfied, you have to know what issues they face and address those as fast as possible.
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.
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
A brief introduction to some of the reasons for ES2015/ES6
1. Throttling A web application might work beautifully on fast networks but stutter and even throw up bugs on slow connections. Fiddler used to be the go-to tool for simulating delays and adding latency during testing; the good news now is that Chrome provides throttling too. There are preset profiles available (e.g. GPRS, 3G, etc.) but … Continue reading Chrome dev tools deep dive : Network