Generate Converter for Kotlin Class by KAPT

Background In web backend development, the operation of an entity need to code a number of similar classes to handle request (avoiding the direct use of entities), which resulting in related terminology: PO (Persistent Object) DTO (Data Transfer Object) BO (Business Object) VO (View Object) Most of these classes trim a few fields directly from the entity. For example, by using OrderEntity in a request to create an order, it would process like following: ...

April 13, 2020 · 4 mins · Lex Cao

Reactive Overview

Reactive Streams Reactive Streams started as an initiative in late 2013 between engineers at Netflix, Pivotal and Lightbend. Reactive Streams is an initiative to provide a standard for asynchronous stream processing with non-blocking back pressure. This encompasses efforts aimed at runtime environments (JVM and JavaScript) as well as network protocols. You can read the origin specification on official website of Reactive Streams. Also, you can read the Chinese translation from here. Asynchronous stream processing with non-blocking back pressure. The Reactive Streams is composed of following: ...

November 28, 2019 · 3 mins · Lex Cao

How to Choose an English Name for Yourself (Step-by-Step)

Looking for names popular the year you were born? Try Name Vintage / 同年名 — U.S. SSA data for 1880–2025, with pronunciation and a shortlist. Or browse girls’ names, boys’ names, a year page, or an A–Z letter page. Quick steps: how to choose an English name for yourself If you are asking, “How do I choose an English name for myself?”, start with a name you feel comfortable using. You can also keep your Chinese name in pinyin; an English name is optional. ...

November 7, 2019 · Updated 2026-11-05 · 6 mins · Lex Cao

Jekyll / Hugo / Hexo Comparison

It is hard to choose a suitable static website generator, especially when you want to build website like blog for the first time. This is my first time to build a blog and have not enough time to go through some popular generators, which I have chosen Jekyll at the beginning but it is not a best one. In the future I am going to try another generators. Here is some brief information I found from Google and hope it should be useful for you to decide starting up on what generator. ...

October 29, 2019 · 3 mins · Lex Cao

Jekyll Multi-Language without Plugin

Goal Support multi-language, mainly in English and supplemented by Chinese; When visiting pages begin with /, e.g. /about.html, /posts/hello-world, English pages would be shown; When visiting pages began with /zh/, e.g. /zh/about.html, /zh/posts/hello-world, Chinese pages would be shown; When visiting ../hello-world posts, corresponding langugage posts would be jumped via the link; Posts which are specified language would only be shown in archive and index pages. Defect As 404.html page was not supported for separate language file, two langugage content would be shown on it at the same time. The jekyll-paginate-v2, a plugin supports pagination for multi-language, is not supported by GitHub Pages. So the blog has not been supported pagination so far. See details below. It is a little bit tricky to show date in multi-language way. Some string formatting work should be taken as it is able to have done that but is not a better way. Please see Jekyll Date Formatting. Setup Firstly, I found a i18n plugin Jekyll Multiple Languages Plugin. ...

October 27, 2019 · 6 mins · Lex Cao