Monthly Archives: January 2019

Archive of posts published in the specified Month

Turing Machine Part 3 — Checking palindromes

This is the third part of the Turing Machine series. For your convenience you can find other parts in the table of contents in Part 1 – Addition Today we check if given word w is a palindrome. First, we add delimiters at…

Phantom types to encode state in C#

You cannot add or remove method from generic interface based on the type. Also, CLR doesn’t support higher kinded types (as of now). Let’s say that we want to encode state of an object in its type and disallow some operations depending on…

Source compatibility issue with Google Guava library

Recently I was debugging a case of NoSuchMethodError when using the Google Guava library. Conceptually my code was doing the following:

In runtime I was using library in version 19 and I was getting the following error:

I decompiled the code…

Turing Machine Part 2 — Checking if a word is a repetition

This is the second part of the Turing Machine series. For your convenience you can find other parts in the table of contents in Part 1 – Addition Today we check if given word w is of a form w = xx. Idea…