Skip to main content

Blog

Coding and living in Finland.

In 2023, my family and I moved to Finland. It has felt like a new journey into the unknown. I keep writing code here, and I also keep recording life, family, work, and the stories along the way.

Apr 9, 2021

Make Your GitHub Profile Stand Out

Personalize your GitHub profile by creating a username-matching repo with a customized README. Here's how to get started!

3.4k1

Jan 21, 2021

Understanding Python's __init__.py

__init__.py files are more than just placeholders—they define packages, control imports, and can even initialize modules in Python projects.

3.4k

Jan 14, 2021

Understanding JavaScript Microtasks vs Macrotasks

Master JavaScript's event loop with a deep dive into the execution order of async/await, Promises, and setTimeout.

7.3k1

Jan 4, 2021

Set Up a Global .gitignore File

Keep your project .gitignore clean by configuring a global ignore file for system and editor-specific clutter.

7.2k

Mar 22, 2020

Build a Time Control UI with Canvas

From high-DPI canvas scaling to hover/click interaction, this post explains how to implement a timeline UI using HTML5 Canvas.

5.6k2

Feb 23, 2020

Visualizing the Pandemic with Maps

Behind the scenes of an interactive coronavirus map — from heatmaps to categorized visuals, a story of data visualization and design evolution.

10k6

Aug 30, 2019

Building a Dot Map from Scratch

A full walkthrough on creating a custom dot map using QGIS, Canvas, and JavaScript — from data extraction to pixel rendering.

13k4

Jun 6, 2019

How to Load Stunning Mapbox Maps in WeChat Mini Programs

Use web-view to embed Mapbox GL JS and unlock rich visual features like 3D, heatmaps, and clustering within your WeChat Mini Program.

8.5k

Jan 22, 2019

Using Mapbox Maps in WeChat Mini Programs

WeChat Mini Programs don't officially support third-party maps, but with a clever web-view workaround, this post demonstrates how to embed interactive Mapbox maps—covering enterprise requirements, domain verification, and postMessage communication.

2.8k

Jan 10, 2019

JavaScript Padding Numbers with Leading Zeros

Learn how to pad numbers with leading zeros using a simple one-liner in JavaScript, and watch out for edge cases with overly long numbers.

6.4k6

Dec 27, 2018

Automatic SSH Deployment with Travis CI

From manual deployment to full automation, this post walks through configuring Travis CI to run builds and deploy code to remote servers over SSH.

11k

Nov 13, 2018

Writing Code Like a Pro: Code Quality and CI Guide

A hands-on guide by Mofei on maintaining high code quality using Travis CI, Tape, nyc, and codecov.io, complete with real-world Node.js examples.

7.3k1

Nov 6, 2018

Debugging Node.js C++ Addons with VS Code

A complete guide by Mofei on how to debug native Node.js C++ addons in VS Code using launch.json, breakpoints, and preLaunchTask settings.

8.1k

Jul 13, 2018

Debugging Node.js C++ Addons with VS Code

A complete guide by Mofei on how to debug native Node.js C++ addons in VS Code using launch.json, breakpoints, and preLaunchTask settings.

18k18

Nov 29, 2017

Introducing mapv-Editor Beta

mapv-Editor is a web-based geographic data editor built on the MapV engine, supporting multi-format data import, customizable base maps, and intuitive layer configuration with a near-native user experience.

7.9k5

Nov 6, 2017

Simulating a Crossroad with Zebra Crossings Using JavaScript Canvas

This post explores the process of simulating a crossroad with zebra crossings using JavaScript Canvas, covering normalized coordinate processing, road sorting, intersection computation, and canvas transformation techniques.

10k9

Aug 22, 2017

Generating CSV with JavaScript and Fixing Chinese Encoding Issues

This post explains how to generate CSV files on the frontend using JavaScript, addressing common issues like Chinese encoding, comma escaping, and custom file names via BOM, data URIs, and the download attribute.

11k8

Jun 7, 2017

JavaScript Currency Formatting with Regex: A Deep Dive into Non-Capturing Matches

Effortlessly format numbers with commas using a concise regex while exploring the mechanics of non-capturing matches.

7.3k6

Coding, and living with intention.

Subscribe
© 2012–2026 Mofei·Privacy·Terms
Life compiled in code