Blog Posts

Recent posts

Java - illegal generic array

less than 1 minute read

The following code will have a compile error 1 new List<E>[]; The reason is that it is not a typesafe. It will violate the generic type system in Java

C++11- enum class with underlying type

less than 1 minute read

C++11 allows us to specify the underlying type for enum class as shown below. If specified value is not in the range of the underlying type, compiler can cat...

Git - submodule

less than 1 minute read

Sometimes, a project can depends on another project which is in different git repository. Git can provide a way to maintain this dependencies by a command ca...

C++ - Unit test framework “doctest”

less than 1 minute read

This C++ testing framework is very light and only requires a header file to include. Above all it will allow to have testing code in production code. https:/...