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

Choose An English Name

Introduction I am Lixin Cao in Chinese Pinyin. I was finding a way to give myself an English name, then I found a post, How to choose an English name, which gives an useful method for choosing an English name, by which I made a program to help choose an English name. You can try it here. I will cover some detail of the post and the program in the below. The post says Do not try to be creative in picking an English name. ...

November 7, 2019 · 2 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