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
I Know Node

Understanding NodeJS Event Loop

It took me a while to understand how Node achieves non-blocking IO within one single thread. The misconception about Node being single threaded is what causes my confusion. In this post, I'll demonstrate that Node is not completely single threaded, and show you the general implementation of event loop.

Read
How I React

Server Side Rendering With React Part 3

In the previous two posts, I set up the basic configuration for both the render server and the client. I also add a routing system to the app and make it work on both sides. In this post, I'll handle the most challenging part -- adding Redux to the web app.

Read
How I React

Server Side Rendering With React Part 2

In this post I'm going to add routing support to the app I built in the last post. Traditionally, we use BrowserRouter to deal with client side routing. It works by monitoring the address bar in the browser and display content accordingly. However, when the server renders our application, it doesn't have access to the address bar. To resolve this, the react-router-dom library provides a different component called StaticRouter.

Read
How I React

Server Side Rendering With React Part 1

This is the part 1 of a series of 3 posts on server side rendering with React. In this post, I'm going to build a boilerplate React application that simply delivers a basic feature of server side rendering. The app will render the JSX on the server and then ship the fully rendered HTML down to the browser, after that, the client side JS will be sent along and the React app will boot up on the browser.

Read