Encrypt data like Emperor: Caesar cipher

Whether we're concerned about privacy or not, we utilize cryptography every day. Thanks to HTTPS we can securely log in to online banks, use government services, share our location, chat with friends, and participate in other activities where leaks could result in financial loss, damage to our reputation, or even mental or physical harm.

Your communications with this website are also encrypted! That's not because you're transmitting or receiving confidential data while being here, but rather your browser wouldn't allow you to open this page otherwise. In the past, something like credit card details could be transferred in plain text, making it an easy target for hackers. Today, the risk is significantly reduced as browsers enforce site owners like me to secure the connection.

Long before the advent of the World Wide Web, the secrecy and confidentiality aspects of his role led Julius Caesar to contemplate how to safeguard his orders. A messenger carrying important information could be intercepted, and then it would be disclosed to the enemy. To counter this threat, he began encrypting his correspondence using a simple algorithm that was eventually named after him: a Caesar cipher.

Read more...

Taking apart Quicksort algorithm

Quicksort is a curious algorithm. Many people learn it soon after the bubble sort because it can be easy to understand and code. Despite this, quicksort is widely used. For instance, Java comes with a dual-pivot implementation to sort arrays. Here, I want to dissect it step by step to cement my knowledge.

Read more...

Documentaries: December

I've watched several documentaries over the past couple of months and wanted to jot down my impressions. Here's the list:

  • 20 Days In Mariupol
  • The Tinder Swindler
  • Brawn: The Impossible Formula 1 Story
Read more...

Secret Handshake: Solving an exercise using bitwise operators and comparing performance

A couple of days ago, I took on an interesting task on Exercism. You can find the full description here. The goal is to create a function that takes a number between 1 and 31 and converts it to a list of actions. The sequence is defined by the five rightmost digits of the number when converted to binary. If you're unfamiliar with the binary system, I recommend reading this explanation first.

In this post, I'll discuss how I gradually improved my initial solution and share some interesting findings about the performance of different approaches.

Read more...

My approach to to-do lists powered by Kanboard

It can be hard to decide how to spend our free time. We may have some ideas about activities to engage in, but our brains prefer not to invest effort in something deemed unrewarding. Alas, among such things we can find work on quite useful tasks. Usually these activities don't yield immediate tangible output, and it takes months and years to achieve our goals. Say, learning a new language or obtaining any other comprehensive skill. Consequently, our motivation tends to fade off over time. Faced with a choice between difficult or boring tasks and something easy, we often succumb to the temptation, and turn to social media or TV shows.

This summary is based on two books I've recently read: "Thinking, Fast and Slow" by Daniel Kahneman and "Willpower and self-control: How genes and the brain hinder our struggle against temptations" by Irina Yakutenko. The former explores how our brains trick us from a psychologist's perspective, the latter is focused on biochemical processes.

To mitigate this problem, I started creating to-do lists. Having a clear path to follow makes it much easier to stay on the course. No doubt, there are various causes of procrastination, and what works for one individual may not work for another. But to-do lists can be a valuable ally for many people.

I'd like to share my experience on how I've managed to organize my time better.

Read more...

How to generate RSS feed with ROME and Spring Boot

The modern internet is highly centralized. While independent websites still exist, we rarely go beyond the firsrt few search results and get news from social media. These platforms are the internet for many people because they not only help old friends stay in touch, but also act as content aggregators and providers, enabling algorithms to control what we see.

Recent changes on now X and Reddit pushed me to take a look at decentralized solutions. I joined Lemmy and Mastodon. Both are significantly smaller than their commercial counterparts and don't have as much content, which makes mindless scrolling for hours impossible. This change alone freed up a lot of time and helped me realize how addictive these services are.

On the other hand, the absence of a 'smart feed' puts responsibility of finding new content on the user. As I discovered, people continue to post on personal blogs, and some websites still generate RSS feeds. I believe it's important to have full control over our feeds. The cheap pleasure that comes with scrolling social media harms our lives and distracts us from our long-term goals. Instead of doing something useful, we spend endless hours arguing with strangers and watching memes.

Algorithms' job is to keep us engaged, they don't care whether we get useful information or engage in benificial activities in the process. In fact, platforms like Facebook profit off hate speech and misinformation. See also: How Facebook Became a Tool for Genocide.

To be part of the solution and not the problem, I decided to launch this blog a couple of months ago. Now, I want to introduce an RSS feed that should make following me easier. Let's see how I implemented it with ROME, Spring Boot, Docker and Nginx!

Read more...

Documentaries: October

I've watched several documentaries over the past couple of months and wanted to jot down my impressions. Here's the list:

  • Turning Point: 9/11 and the War on Terror
  • Challenger: The Final Flight
  • Hitler's Circle of Evil
Read more...

Testcontainers and Spring: Datasource becomes inaccessible between test classes

Testcontainers is a great tool for managing external services required for the proper functioning of an entire application or its components during testing. It automatically deploys these services before a test begins and then stops them once testing is over. This simplifies the process of running tests across multiple environments.

While working on integration tests for the service behind this blog, I stumbled upon an issue. It lies on the border between Testcontainers and Spring. When executing a single test or an entire class, everything worked as expected. But when executing multiple test classes (e.g. with ./gradlew test), the database became inaccessible.

In this post I'm exploring one of the possible solutions to this issue.

Read more...

Alternative to Postman: Insomnia

This year, I decided to ditch Postman. It had started pushing cloud integration up to an extent, where working without creating an account became nearly impossible. Many features were disabled in the "lightweight" mode. From a privacy perspective, I could have created an email alias, but I wasn't happy with the overall direction of their development. Why invest time in a tool that is likely to become less customer-friendly and accessible in the future?

Read more...

Documentaries: September

I've watched several documentaries over the past couple of months and wanted to jot down my impressions. Here's the list:

  • Unknown: Cave of Bones
  • WWII in Color: Road to Victory
  • A Compassionate Spy
  • MH370: The Plane That Disappeared
Read more...

Basic API and UI test automation framework

A few weeks ago, a potential employer asked me to complete a test assignment. The task was to implement a bunch of API and UI tests. This requirement is quite standard in the field, but I had not previously compiled any work ready to be shared alongside my CV.

Therefore, I made the decision not only to complete the assginment but also to document and explain it here in this blog post.

Read more...

Citicar: Small electric car from 1970s

Not so long ago, electric vehicles were considered gimmick. For people like myself with no special interest in them, it all began with the likes of Nissan Leaf and Mitsubishi i-MieV, with Tesla joining the party a few years later. I'd never actually thought who their ancestors could be until I stumbled upon this Mastodon post about an adorable little car called the Citicar or Comuta-Car.

Late 6HP CitiCar electric car at the America on Wheels Auto Museum

Read more...