Timezone choice for Postgre and things to do in Java

Always use UTC as the timezone for postgre timestamp/date columns, which is considered to be the best practice and recommended by Postgre, e.g. And you java application is normally using LocalDateTime/LocalDate, if your system is not a global operation. So there needs to be a conversion in data access layer of you java application. According …

Timezone choice for Postgre and things to do in Java Read More »

Make sure chromedriver can run with Java selenium code, both in a real machine and in docker

Install chromedriver You want to make the following line of code run successfully. In windows, you need to download chrome driver from https://chromedriver.chromium.org/downloads and put it in system’s path (An alternative is to set the executable file’s path as a system property “webdriver.chrome.driver”, not beautiful) In *nix or linux-based Docker, you can Options needed for …

Make sure chromedriver can run with Java selenium code, both in a real machine and in docker Read More »

Opinion: Don’t use class for data structure in typescript (2019). Use interface only

Always use interfaces instead Problems of class: Lots of frameworks such as Redux don’t support class instances. They only support plain objects. There are tools that can convert plain objects to class instances, but the point below makes it awkward. Given a variable “someType: SomeType” in the code, you don’t know if it is a …

Opinion: Don’t use class for data structure in typescript (2019). Use interface only Read More »