Author's photo

Flaky Behavior in Concurrent Tests Caused by Static Fields

  • 1167 words
  • 6 minutes read
  • 16 Aug 2023

What’s wrong with this Java code?

public class App {

    private static Repo repo;

    App(Repo repo) {
        this.repo = repo;
    }

    String greet(int id) {
        return repo.getGreeting(id);
    }
}

class Repo {

    String getGreeting(int id) {
        throw new UnsupportedOperationException("not implemented yet");
    }
}

Understanding Telegram Bots and How They Work

  • 2040 words
  • 10 minutes read
  • 3 Aug 2023
Figure 1. Telegram bot in cyberpunk universe
Figure 1. Telegram bot in cyberpunk universe

You may have heard about Telegram bots or even use them on a daily basis; however, for many people, they seem like small pieces of magic that somehow accomplish tasks. The goal of this post is to grasp the technical side of the Telegram system from a bot’s perspective, to examine how chatbots communicate with other system components, and to explore what is required to build one.

Reclaiming Disk Space in PostgreSQL after DELETE operation

  • 736 words
  • 4 minutes read
  • 17 May 2023
Figure 1. Example of initial table with corresponding index
Figure 1. Example of initial table with corresponding index

The above is a simple table with a corresponding index that we are going to use to describe the data deletion flow using two methods: DELETE and TRUNCATE, and how those methods affect physical space after completion.