Ben Chuanlong Du's Blog

It is never too late to learn.

Assert in Java

  1. Avoid using assert in Java production code as assertion is not turned on by default. Throw exception instead (since assert is just a syntax sugar of throwing exceptions).

The most important thing to remember about assertions is that they can be disabled, so never assume they'll be executed.

Therefore keep the followings things in mind when using assertions:

Python Virtual Environment

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. venv is a standard Python library and is the recommended way for managing virtual environments in Python3.

  2. When developing a Python project, it is recommended that you use Poetry to manage …

Dataframe for JVM

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Spark DataFrame

Spark DataFrame is a great implementation of distributed DataFrame, if you don't mind having dependency on Spark. It can be used in a non-distributed way of course. Spark DataFrame …