Chen Riang's Blog

Live everyday like it's your last

Spring Data Redis

Redis is a famous in-memory data store that often used as database, cache, and message broker. Spring framework come out with Spring Data Redis that provide a very easy configuration and access to ...

Remove multi-line line end whitespace

Today, I bump into a problem when fixing some failed unit test. Long story short, I need to compare returned multiline string from class A and for some reason it randomly added a whitespace in eac...

Jackson Ignore Null and Empty value

Today, I bump into a problem when fixing a unit test when asserting Jackson XML deserialized string. Problem Jackson XML deserialize null and empty value. POJO 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ...

Spring Repository Transnationality

Recently, I met the following exception when trying to create my custom delete method on repository. org.springframework.dao.InvalidDataAccessApiUsageException: No EntityManager with actual tra...

Tensorflow Data Validation

In Google’s whitepaper (“Hidden Technical Debt in Machine Learning Systems”) highlighted that in a real production system, machine learning(ML) actually is just the tips of iceberg. To create a eff...

Jackson XML Parsing

Recently, I have a task to parse XML document and found this awesome library called Jackson. Although it is famous in handling JSON parsing, their XML parsing implementation is pretty good and cle...

Break Large CSV into parts

Often time, process or read a large CSV file is quite troublesome. With the concept of parallelism, we can break the file into smaller chunk and create multiple processes to process each of these s...

Process vs Pool

Python Multiprocessing

TL;DR Use Process when the task amount to execute is small has long IO wait Use Pool when the task amount to execute is big has short IO wait co...

Python Multithreading vs Multiprocessing

My first impression towards python multithreading and multiprocessing is that both of them work pretty much the same. However, this is wrong and in this article we will be looking at the difference...

Kubernetes Dashboard

Kubernetes has a dashboard web UI that provide an overview of applications running on your cluster, as well as for creating or modifying individual Kubernetes resources. Deploy Dashboard 1 kubect...