Welcome to March 32nd

My wife and I both have watches with the date window - the one that shows the day of the month. At the end of March, nearly midnight, my watch’s date window switched to number “1”, which stands for April 1st. Though my wife’s watch started to show number “32” instead. I was curious why, and found out that it is because of so called outsize date mechanism.

Covariance and contravariance in programming

Whenever I hear “covariant return type”, I have to pause and engage my System 2 [1] thoroughly in order to understand what I have just heard. And even then, I cannot bet I will answer properly what it means. So this serves as a memo for me of the concept of variance [2] in programming.

Books I read in 2019

2019 is the first year I decided to track books I have read on Goodreads. Here is the list. Though, it might be not complete, because I got this idea only in December and struggled to recall all the books.

The origin of the word "maintenance"

Oh boy, here I go mistyping the word “maintenance” again! For some reason, this is the most complicated English word for me in terms of spelling. It comes out as “maintanence”, or “maintenence”, or some other variant, but almost never the correct one. Even seemingly complicated to write words like “daughter” are no-brainer for me. But whenever I am done typing “maint”, I already know I am doomed for failure.

Java geospatial in-memory index

One of my recent tasks included searching for objects within some radius based on their geo coordinates. For various reasons - not relevant to this topic - I wanted to make this work completely in memory. That’s why solutions like MySQL Spatial Data Types, PostGIS or Elasticsearch Geo Queries were not considered. The project is in Java. I started to look for possible options, and, though, I found a few, they all lacked an easy to follow documentation (if at all) and examples.

Enabling trace logging for Elasticsearch REST Client with Logback

Recently I had some issues with Elasticsearch - all requests were failing with “bad request” error. In order to understand what was wrong with these requests, I, natually, decided to enable debug/trace logging of for ES REST Client, but couldn’t find out how. Partially, because the official documentation on this topic could have been more informative, to be honest. But mainly, because my project uses Logback and the REST Client package uses Apache Commons Logging.