Cheap VPS providers table

A couple of months ago, Amazon raised prices for their Lightsail VPS service which I was using. I decided to move to another provider to save some money and get more performance. My Lightsail plan wasn't that powerful at all, and eventually I got x4 RAM with Hetzner for almost half the price!

In the post you'll find the table I used to compare various providers.

Read more...

GIMP photo editing checklist

I was looking for a tutorial about photo editing in GIMP. I found a video that touches multiple tools and explains how to use them, so I thought it could be useful to jot down a checklist based on that info. Most of the mentioned tools are located in the colors menu. For details, please refer to the video.

Read more...

Disable docker compose CLI menu

Docker compose introduced a new feature in a recent update called the compose menu. It adds an extra line in the terminal while running docker compose up in the attached mode, i.e. without the -d flag.

Docker compose menu

Image source: https://github.com/docker/for-win/issues/14021#issuecomment-2161370349

The issue is that the menu breaks the active session. In my case, after stopping the containers, I could not see what I was typing in the terminal, as if I was entering a password: the text was not visible.

As this menu doesn't bring anything useful to the table, I figured I should be able to disable it. According to the documentation, there are two ways to turn it off.

Read more...

DuckDuckGo AI Chat

DuckDuckGo, a privacy-friendly alternative to Google and other search providers, has recently launched a new product: AI Chat. It offers anonymous access to popular AI models, including GPT-3.5, Claude 3, and open-source Llama 3 and Mixtral. While I cannot make a reliable assessment of their claims, using this service allows you to work with these models without registration, which is a good starting point.

I decided to compare them to ChatGPT 4o. There are many ways to do this, but I didn't aim to make a professional and thorough comparison. As a user of these tools, I wanted to see how they could handle my daily requests. Since I am learning German, sometimes I need to clarify certain words, phrases, or how to apply different cases in various situations.

The prompt was inspired by my mistake on Duolingo. To put it simple, I thought that the German "in" was equivalent to the English "to". However, it turned out that "in" can change its meaning depending on the case.

Let's see how various LLMs explained the difference.

Read more...

QA meme

I decided that if this is my blog, then I should be able to post anything, including silly memes!

A soldier jumps on a bridge; it handles the load. Then, tanks come, and the bridge is about to collapse.

Read more...

Udemy courses: Git and Docker

I want to recommend a couple of courses on Udemy that I took over the last couple of months. Both helped me gain confidence and knowledge in tools that I use every day: Git and Docker.

Read more...

Sim racing on Linux in 2024: is that possible?

The state of racing simulators on Linux today is not as bad as I expected. Last time I tried them about ten years ago, it was still a plain WINE without DirectX to Vulkan translation layers, Valve hadn't released Proton yet, and other improvements by numerous contributors from the open-source community weren't available. Games like rFactor simply didn't work at all.

Recently, I decided to give it another shot. Even though Linux still might not be a viable option for all simracers, I found it doable!

Read more...

Dockerized yt-dlp to download and tag mp3 files

Music streaming services provide us access to huge libraries, which is great! Algorithms study what we like and offer useful recommendations or let us discover something entirely new.

However, we can only access what has been officially released. Some "live in ${city.name}" DVD release that you enjoy might not be available on a streaming service. Occasionally, artists and labels end up in legal battles, and the content that was released in the '80s and '90s suddenly can't be distributed anymore. Over time, I started to notice that a playlist with my favorite music lost at least a third of the tracks I liked to listen to! That makes other sources of obtaining music relevant again.

YouTube is one of them. The quality is not fantastic due to irreversible compression, but there are so many live recordings, obscure releases, and covers that I find it worth it. As I store music on my home server, I needed a solution that wouldn't pollute it with hundreds and hundreds of packages. Yes, I'm looking at you, ffmpeg! Probably most tools that can download and process videos from YouTube depend on ffmpeg.

So if you too want to utilize yt-dlp in an isolated environment, I can offer dockerization!

Read more...

rF2 Stint Visualizer

I recently started playing racing simulators and joined a league that mimics the real Formula 1 championship. These cars are really challenging and unpredictable, especially with my experience. Another key aspect to consider is tire strategy. There are several compounds that offer different levels of traction, wear, and overall speed. A good strategy can help you gain positions, while a bad one can undermine solid driving.

I decided to create a tool that would help me to find out the most common strategies.

Read more...

A bug I found was fixed and included in the release!

In March, I wanted to add code generation to a project I was working on. I had a publicly available OpenAPI contract of considerable size, and using it I needed to integrate with a third-party service. I decided to stick with the generator I was already familiar with. Unfortunately, it was incompatible with the specification at my hands!

Read more...

EP & BVA Practice Assignment: explanation

A couple of years ago, I created a simple website designed to assist QA engineers in practicing some of the most commonly used test design techniques: Equivalence Partitioning and Boundary Value Analysis. The site provides a specification of a feature along with multiple implementations; one is correct, and the others are not. The objective was to show that the correct test input can effectively detect all errors. However, my initial intent was not clear to the end users because I did not provide correct answers or any explanations! Let me do that in this post.

Read more...

Switch to GitHub Actions and Packages

To no one's surprise, posting regularly to a blog when you have a job and when you don't are two different things. Nevertheless, I'm trying to reincorporate writing into my daily routine. If you're reading this, then I have succeeded! In the previous entry, I briefly described that I settled on a Go backend and a React web app for this site, explaining how code generation based on the OpenAPI specification simplifies the synchronization of any changes between the two.

Once the code is written and tested, it's time to deploy it to my VPS. I used a couple of tools for that, with the actual commands stored in Makefiles. For the Go service, it looked like this:

  1. Build a new Docker image.
  2. Save it as a tar.gz archive.
  3. Copy it to a remote server using scp.
  4. Load this image to Docker.
  5. Update the running container.

While I believe there's nothing wrong with this approach given the nature of the project, I wanted to switch to GitHub Actions and Packages. That would eradicate the need to define deployment properties on every machine where I code, let alone maintaining them up to date if. Moreover, even though the exact tools differ from company to company, this approach would be much closer to what a real business would do with their product. In other words, besides the personal interest, it is relevant to my job!

The transition was rather simple. I was already building Docker images, so all I had to do was to move this part to GitHub and push images to their registry. Here, I want to document what I did and think about what can be done next.

Read more...

OpenAPI code generation with Go server and React app

When I created this blog last summer, I had several goals in mind: to acquire new skills, learn about fresh technologies, and have fun in the process. Its simplicity allowed me to rewrite the project multiple times using different programming languages and libraries: Rust with Axios, Java with Next.js, Java with Thymeleaf, and finally, Golang with React. While the first two options reduce the amount of code by handling both the service logic and the HTML rendering, they also take on too much responsibility in this way. Not that this is wrong by definition, but I prefer to separate these concerns.

However, this approach increases the workload. I had to build models on both sides, consider not only the controllers but also the client implementation, where changes on either side can break the integration. In this post, I want to explore a way to eliminate this overhead and explain how to generate code for a Go server and React client based on an OpenAPI specification. The idea is not limited to this stack, it can be easily applied elsewhere with suitable tools.

The full demo project is available on GitHub.

Read more...

How test engineers can use WireMock to substitute external services

It might be hard to find a fully independent service today. Even in the case of a monolithic architecture, where all components of the software are tightly coupled within a single codebase, there's still a need to integrate with the outer world. For instance, internal banking logic can be self-sufficient. But functionalities like police security checks and interbank money transfers can't be done in isolation.

During the development phase of a product or feature, programmers may write stubs and mocks to substitute missing dependencies. As QA engineers, however, we want to test the code that will go into production, touching the same statements and execution paths as the real data. Furthermore, we need to validate the system's behavior with various inputs, hence it should be possible to change how the external service responds to the program under test.

WireMock is a tool that enables us to do exactly this. It launches an HTTP server that can be configured to respond to specific requests in a desired manner. Let's say there is a system that should verify the recipient's IBAN against a database. If the response is positive, the transfer proceeds; if negative, the transfer must be blocked.

Read more...

The year of the personal web

Was 2023 the year of the personal website? And what about 2024?

I'm not sure about 2024, but on the last day of 2023, I'd like to respond to the first question posed by Matthias Ott. His Own Your Web newsletter was one of my motivations to keep working on this blog. Seeing others and their website designs reminds me of the days before social media, which had more room for personal expression.

I don’t mean everything is bad today. However, I like being able to personalize my blog with snowflakes, a Christmas tree at the bottom of the page, and altering the mood of my visitors. We can't do that on Facebook or Twitter, which I find odd. Many would enjoy and even pay for such personalization. The only example I can think of is Steam, where gamers can purchase various avatar borders, profile backgrounds, and other visual elements.

This year wasn't just about starting my website.

Read more...

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...