Author's photo

Moving Files from One Git Repo into Another Preserving Change History

  • 20 Oct 2023
  • 1375 words
  • 7 min read
Figure 1. A visual concept of merging things into one
Figure 1. A visual concept of merging things into one

Sometimes, you realize that a common library is being used in a single project but resides in its own Git repository. At other times, you may decide to merge a few Git repositories into one to reduce maintenance issues. There are many other similar scenarios that involve moving a portion of one Git repository into another. A common problem that unites all these cases is how to preserve the Git history for the moved files.

The problem can be described as follows: given two Git repositories, source and target, the task is to move content from source to target, either wholly or partially, while preserving the Git change history.

Flaky Behavior in Concurrent Tests Caused by Static Fields

  • 16 Aug 2023
  • 1167 words
  • 6 min read

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");
    }
}

How Do Telegram Bots Work

  • 3 Aug 2023
  • 1881 words
  • 9 min read
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 bots communicate with other system components, and to explore what is required to build one.

PostgreSQL Does Not Free Up Physical Space After DELETE

  • 17 May 2023
  • 565 words
  • 3 min read
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.