From https://xkcd.com/1285/

The linters are great tools that helps developers to improve code quality and even discover potential bugs. It uses static analysis approach and can provide almost realtime feedback when combining with IDEs / editors. It is more and more common for developers to adopt it and even some programming languages (ex. Golang) embedded a linter by default (and refuse to run if you got lint errors). But sometimes we might not use it in the best way, and I would like to share my two-cents in this post.

Linter at a glance

Let’s use as an example to demo how linter works. When…


From Wikipedia

One of the most interesting news in the past few days is that Windows 11 is going to allow running Android apps (from Amazon appstore) natively. This new feature is supported by Intel Bridge technology and not many technical details are revealed at the moment, but from some descriptions:

Intel Bridge Technology is a runtime post-compiler that enables applications to run natively on x86-based devices, including running those applications on Windows. — Intel Core Processors and Intel Bridge Technology Unleash Windows 11 Experience. Intel Newsroom

“Intel believes it is important to provide this capability across all x86 platforms and has…


React Server Components is an experimental feature released Dec. 2020, it is kind of a mix of Client Side Rendering (CSR) and Server Side Rendering (SSR). But how it mixes them is what we are going to explore in this post.

DISCLAIMER: As react server components is still highly experimental and updated from time to time, this post may not be correct after Jun, 2021.

CSR vs SSR

The battle between CSR and SSR never ends and there are massive articles and discussions to analyze the pros and cons of them. As a software developer / architect starting a brand new project, you…


TL;DR is 5% faster in time and 10% less memory consumption comparing to when it comes to a big Set.

It is not a secret that there is no built-in Set in go, so go developers use to mimic the behavior of Set. Use to implement Set means that the value of the map is not important, we only need to focus on the existence of the key. Most of the time people may choose as it is the type with the least memory consumption, but in go, there is another option to use the…


One thing I do dislike in golang is that sometimes a simple task can be very tedious. One of them is getting maximum / minimum value of two integers.

Background

The root cause of the tediousness of this task is the lack of generics in golang which means you can not implement a max/min function which accepts both integer and float numbers. As the built-in max function is math package accepts float64, the common fixes that peope use are:

  • Write a wrapper function for math.Max or math.Min to do type conversion
  • Write your own max function

You might think…


Official Website: https://ffmpegwasm.github.io/

FFmpeg is a famous framework/tool when it comes to video/audio processing, now with ffmpeg.wasm you can use FFmpeg right inside your browser without installation or upload your file to the server. Although ffmpeg.wasm is not as fast as FFmpeg, but it might come in handy for certain use cases.

In this post, I would like to share how to install and use ffmpeg.wasm and also technical details behind to support your usage.

Install ffmpeg.wasm

To install and use ffmpeg.wasm, you only need to use npm/yarn:

To use ffmpeg.wasm in…


This is whatHiDPI looks like. Lol

In 2019, I bought a Chromebook (HP Chromebook 13 G1, release on 2016) to be a lightweight laptop when I am out. I really enjoyed using Chrome OS with crouton, but one thing really bothers me is the fact I cannot run container. That’s why I decided to try the latest Gallium OS to get full Linux experience inside my Chromebook, but when I completed installing Gallium OS, the HiDPI hitted me and it took me tons of time to survey how to resolve this issue, but sadly I am only able to fix around 60% of them. …


2020/3/28 Update: Add

When you use Node.js in your project, you need to take care of node_modules installation in your CI/CD pipeline. You may use , , and , but what is the fastest way of doing so is still a question we are looking for answers. Here in this story I would like to experiment all possibilities I know to find out the final answer.

TL;DR

If you are in a hurry, what you have to do are:

  1. Disable stdout output
  2. Use cached node_modules
  3. Use
  4. Use global cache ( only)


Gitpod is an online IDE for GitHub and GitLab, it is great and makes my life easier when there is not enough resource in my laptop. But as a VIM user it is pretty annoying when I hit Ctrl+w (which is commonly used to navigate between different VIM window), the whole Gitpod tab just close and I have to reopen it again.

That’s why I start to work on a Chrome Extension (Gitpod Window) to make the overall experience of using Gitpod even better. The requirements I listed are:

  1. When user click the extension icon on a GitHub or GitLab…


As a developer, it is common to leverage open source projects to complete your application, and it is more common to find your requirement unsatisfied or a bug stopping from fulfilling your goal.

Here are 3 tips for you to quickly fix problems in open source, it might be intuitive, but useful if you haven’t tried before.

Check Documents

Many open source projects comes with Wiki, an official website or a or folder inside the repository. …

Jerome Wu

A technology enthusiast wishes to make the world better and better. Maintainer of tesseract.js and ffmpeg.wasm

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store