Trie data structure

I recently learned about a trie data structure. While it may not be as widespread as arrays, hash tables, linked lists, or binary trees, there are applications where it excels. The main advantage of a trie is that you can search in constant time, regardless of how many elements it contains. This makes tries useful for autocomplete systems, spell checkers, dictionaries, and similar applications.

A tree in black and white

Read more...

rF2 Stint Visulaser is back online

Last year, I created a tool for rFactor 2 to visualize racing stints. Here's what it produces:

rF2 Stint Visualizer: example

Since then, I'd moved away from GitHub and made all my repositories private just to avoid confusion caused by having the same projects hosted in various places with different code. This led to GitHub Pages restricting access to the visualizer, which I had previously hosted there.

Yesterday I brought it back online. You can now find it here: rf2sv.fakeplastictrees.ee. For anyone unfamiliar with the tool, please refer to my original post, where I spoke about its purpose and limitations.

Read more...

Lombok compilation error: cannot find symbol

I was working on the service that powers this blog when I stumbled upon an odd issue.

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /app/service/src/main/java/ee/fakeplastictrees/blog/service/user/model/UserExceptionFactory.java:[8,1] cannot find symbol
  symbol:   static withData
  location: class ee.fakeplastictrees.blog.service.core.exceiption.PublicExceptionFactory

There were 52 more errors like this in different classes. I hadn't changed the Java version or any dependencies since the previous build. Moreover, most of the files that reported failures had absolutely no changes in them. I was able to build this code not long ago! It was as if lombok had suddenly stopped working for no obvious reason. Nothing in maven's log pointed to the root cause.

A confused man screaming at his laptop

Photo: not exactly me, but the same energy.

Search results were misleading and suggested that my project was configured incorrectly, even though it had worked in the exact same environment just a couple of weeks ago. Eventually, I found the answer!

Read more...

Burp Suite: a helpful tool for testing of client-server software

As a test engineer, I often need to see what requests applications are making and what responses they are receiving. While browsers offer developer tools that include network monitoring, I find them inconvenient. Additionally, you can't use them with mobile and desktop software.

Recently, I discovered Burp Suite, a tool for security assessment and penetration testing that comes with many useful features. Although the professional edition is quite expensive, the free community edition is sufficient for regular testing activities.

Burp Suite

Key functionality

  • A proxy server to intercept traffic.
  • A convenient user interface to analyze network activity.
  • The ability to modify and repeat requests.
  • The option to store individual requests for future use; however, the history is erased in the community edition when you close the program.
  • A text decoder that automatically translates strings like "%7B%22key%22:%22value%22%7D" to {"key":"value"}.
Read more...

Rawe Ceek - is it a race week?

Last month, I bought a domain: raweceek.eu. It refers to a confusing image posted by Ferrari on Twitter ahead of a Formula 1 race in 2020. The text on the image can be read as both "race week" and "rawe ceek", and it quickly became a meme in the community.

2020 British Grand Prix: Race week / Rawe ceek

I didn't have anything specific in mind before the purchase. I wanted to create something fun, a lighthearted website that could be of use, but wouldn't require regular maintenance. And so the feature was born from the meme's name: visitors should be able to quickly see whether the current week is a race week or not!

Read more...

Plasma's spare layouts not working on Wayland: workaround

I decided to try Wayland due to some issues I suspect might be related to Xorg. So far, so good. However, it comes with its own problems. Spare layouts don't seem to be working as expected. It's a super useful feature for those who have more than two layouts because it makes cycling through them much easier. According to the documentation:

Spare layouts allow to toggle between small number of layouts easily while keeping more layouts handy close by. For example you might use 3 languages: English, Ukrainian and German but first two are used often and third one just occasionally. In this case you can configure first two as main layouts and German one as spare one - when you toggle with keyboard and left mouse button the switch will happen between main layouts only but you can always choose 3rd layout with context menu.

Here is my configuration:

Plasma system settings: keyboard layouts

I want alt+shift to only switch between English and Russian. Unfortunately, this setup doesn't work as intended: all layouts are in the rotation. Therefore, switching from Russian to English takes an extra step through German. Ideally, I want to use German only when I'm practicing it via the applet on the taskbar.

I found a workaround for this bug!

Read more...

How to mock server responses while testing web apps with Playwright?

Playwright is a relatively new automation library for browser testing. Despite that, it has already gained some user base, with articles and tutorials regularly appearing on Software Testing Weekly. It comes with many features necessary for UI tests, but crucially, it can also work with API requests made by the web app under test. This allows us to either completely mock responses from a backend server, or alter them - depending on what we want to achieve. In this post, I will show how to do both things in Java.

A laptop with a code editor open

Read more...

What would happen if my electronic device caught fire during a flight?

Aviation professionals say that a fire on board is one of the most dangerous emergencies that can occur during a flight. While I don't have any expertise in this area, I concur that being burned alive is something I'd prefer not to experience. Recently, a passenger's bag with a power bank and e-cigarettes ignited during boarding, forcing an emergency evacuation. This made me wonder: what would happen if my phone or laptop caught fire while the aircraft was airborne?

Close-up of a Woman Recording a Video of the View from an Airplane Window

Read more...

Build linear equations from a scatter plot in LibreOffice

Probably most of us have used software to store data in a spreadsheet and visualize this data. However, these tools can offer much more than that! Recently, I learned that LibreOffice can find out a mathematical function which can be used to predict future values. For instance, based on historical data, we can try to forecast the growth of the average salary over time. Naturally, the accuracy of this method is not guaranteed, but that is not the point of this tutorial.

Scatter plot with linear equations

Read more...

LLM chatbot as a tool to simplify foreign language texts

I believe one of the best ways to learn a language is to use it every day. However, it can be hard to incorporate a new language into your life at the beginning. You simply don't know it well enough to chat online and read news. This leaves you with rather boring learning materials. I've tried to solve this problem with LLM chatbots, and so far, the results are rather encouraging!

Read more...

Aviation accident: Exin An-26B SP-FDO, Tallinn, 18 March 2010

Today, aviation accidents are quite rare, especially in small countries like Estonia with our relatively low volume of air traffic. Nevertheless, one event resurfaced in my memory a few days ago. What made it interesting for an average person like me was the fact that the involved aircraft landed on the then frozen Ülemiste järv, which isn't only a lake next to the Tallinn Airport but also the main source of water for the city.

The accident plane in the Ulemiste lake

Read more...

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