Ben Chuanlong Du's Blog

It is never too late to learn.

General Tips for Gradle

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

Install & Upgrade Gradle

The latest version of gradle can be installed via PPA on Ubuntu.

sudo add-apt-repository ppa:cwchien/gradle
sudo apt-get update

And gradle can be upgraded using the following …

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 …

Use Kotlin in a Scala Project

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

  1. Methods of a Kotlin object can be called in a Scala project by KotlinObject.INSTANCE.methodToCall()

  2. You might need to provide the Kotlin standard library kotlin-stdlib.jar in order to run …

Kotlin vs Scala

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

https://www.quora.com/Is-Kotlin-so-similar-to-Scala-What-are-the-differences/answer/Bruce-Richardson-4

Kotlin Unit Testing

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

Use Java reflection to help test private methods.

https://phauer.com/2018/best-practices-unit-testing-kotlin/

https://medium.com/mindorks/how-to-unit-test-private-methods-in-java-and-kotlin-d3cae49dccd

Java Unit Testing

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

import static org.junit.Assert.*;

assertEquals

assertArrayEquals

Use reflection to test private methods.

References

https://javarevisited.blogspot.com/2018/09/junit-testing-tips-constructor-is-called-before-test-methods.html

https://medium.com/mindorks/how-to-unit-test-private-methods-in-java-and-kotlin-d3cae49dccd