Lazy Evaluation in JavaScript With Generators

Lazy evaluation is a way of avoiding unnecessary calculations by procrastination. Yes, you can do that in programming.

Read

How to Write Recursion Like A Pro

When I started learning programming, one of the most confusing concepts to understand is recursion. Now, when I finally become the pro programmer who I wished I could be when I was a newbie, I feel that these confusions and struggles are unnecessary.

Read

Asynchronous Patterns in JavaScript Part 2

Last time I examined callbacks, thunks and promises in dealing with async control flows in JavaScript. Now it's time to get over the basics and level up our skills. I'll introduce you some of the most exciting techniques in asynchronous programming.

Read

Asynchronous Patterns in JavaScript Part 1

Dealing with asynchronous logic is one of the most challenging parts in programming. In this two-part series, I'll take a close look into different patterns of handling async control flow.

Read

Understanding Blockchain By Writing One With JavaScript

Blockchain technology is widely discussed in the tech community as well as in the mass media. The hype in the media makes blockchain seem like a cutting-edge technology that only trained experts are able to get a hang on. However, we don't need to be an expert to understand the core mechanism of blockchain. In this post, I'm going to demonstrate how blockchain works by writing a simple blockchain with vanilla JavaScript.

Read
I Know Node

Turbo Charge MongoDB Query Speed With Redis

I've been working with MongoDB for quite a while. For most of the part, I like it. The syntax is expressive and simple, which makes it very friendly for new developers. After working with it for a while, I gradually realized that some queries are expensive to carry out, and some are unnecessary. So I tried to optimize my queries with various techniques. Here's what I've found.

Read