Xiaoru Li's Profile Pic

Xiaoru "Leo" Li is a computer science student at Karlsruhe Institute of Technology, Germany. He loves to teach himself cool stuff like machine learning and web technologies and write about them.

Disabling Warnings in Node.js

When we ship an application, we wouldn't ever want our end users to be puzzled by the seemingly random "unstable" or "deprecation" warnings caused by the libraries that we have used to build the app. How do we mute the noise in Node.js?

Become a Command-Line Ninja with These Shortcuts

We all know the keyboard shortcuts inside our editor of choice to quickly navigate and edit the code, but how about inside the terminal?

Checking Node Version on Runtime

Some times we have to ask the users to update their Node version, but how do we do that programmatically?

Type Or Interface in TypeScript?

In TypeScript, we can define our own "types" with either keyword "type" or "interface". So when to choose one over the other, and what are the real differences between them? Let's explore it in this article!

ES6 Modules Explained

While building a web app, it is always important to divide our project into modularized chunks in order to reuse and share code. In this article, I will explain how to use the powerful new "modules" syntax in modern JavaScript introduced since ES6.

Kruskal's Algorithm - Step by Step

Kruskal's algorithm is an algorithm for finding minimum spanning trees - how to connect all nodes in a graph while keeping the sum of edge weights the smallest.

Setting Breakpoints for the DOM

When building a web app, sometimes we need to approach it top-down. Let's see how to do that with DOM breakpoints!

Light Type Checking With JSDoc

Want to add type checking to your JS project but don't wanna pull out the big guns like TypeScript or Flow? Use JSDoc!

5 Visual Studio Code Tricks to Boost Your Productivity

I've been using VS Code for everything from coding to taking notes for more than 2 years now, and here are 5 tricks that I cannot live without.

Distributing Python Scripts

Writing Python scripts to help your non-programmer friends automate tasks can be easy, but how are they supposed to install all the right versions of dependencies by themselves?

Dart Tips

I have been playing with the Dart language a lot recently and here are some tips which I find very useful!

Modern Web Apps with Babel and Parcel

Setting up modern JavaScript projects is much easier nowadays!

NO console.log()

Debug your JavaScript code with not-only console.log()

Accelerate Your Workflow with Git Hooks

Git hooks are customizable shell scripts that will be executed during life cycle of a Git command, here for you to accelerate your workflow!

Superpower Your React App with MobX

Why MobX? Because state management can be a hard thing to do.

Git Tricks

I will be constantly updating this post for new tricks I learnt about Git. :)

Fun with Javascript Regex

Regex, or regular expressions in its full name, can feel like some kind of scary dark witchcraft if you are not familiar with them.

Falling in Love with the Compose Key

Extend your keyboard with special characters from all over the world.

Playing with Tmux

I've been playing with Tmux recently, and find it super helpful to manage terminal sessions, especially when doing remote things.

Adding Disqus to Gatsby

The migration from Hugo to GatsbyJS continues!

A New Start of This Blog (a.k.a. Migrating to GatsbyJS)

Just migrated from Hugo to Gatsby v2 beta, and here are some thoughts on the new start of this blog!

Functors and Map

In this post, we'll be exploring what functors and map function really are in the context of functional programming!

Implementing Gradient Descent from Scratch

Gradient descent is one of the most important concepts in machine learning. In this post, I'll be explaining what gradient descent actually is, and implement it in Python from scratch.

Functions, Pure Functions, Immutability

Today, I'll be explaining some of the most important concepts in functional programming, pure functions and immutability!

Functional Programming Is Awesome

Simply better, cleaner code.