Between Tron and Minecraft

Minecraft Minecraft is known for its seemingly endless computer-generated terrain. Sometimes it looks pretty natural, and other times it looks wild and dramatic. On the Minecraft map, you can find things like: hills and mountains, oceans, rivers and pounds, caves and canyons, different biomes. It makes it interesting, aesthetic, and fun to explore. The same is true for the algorithms and the story behind the scenes. Tron “Tron” is a movie from 1982 and for its time, it was a technologically groundbreaking production (though it’s sometimes criticized for its plot). It innovated in visuals and CGI, placing characters in cyberspace using early 3D tools combined with hand work and classical animation. If you like old electronic music, you should also check out the soundtrack scored by Wandy Carlos. The film influenced many artists, later movies and developers. ...

January 7, 2025 · 4 min · Patryk Miszczak-Malesiński

Logs correlation

A service can produce multiple logs for a single request. Furthermore, in a microservices architecture, a request may be handled by multiple services. Typically, a request: hits the API gateway or BFF, then it’s authenticated by another service, and finally it’s received by the target service(s), which may also call other services (e.g. workers or authorization services). When you find an error in your logs, it’s useful to find all the logs related to the request to get more context. That’s where log correlation comes in. ...

November 8, 2024 · 5 min · Patryk Miszczak-Malesiński

Drawing images in iTerm2 in C++ with Skia

iTerm2 has a great but underrated feature. It can display images in the terminal using the “Inline Images Protocol”. There are a few examples of CLI tools that use this feature, like imgls, which lists files with thumbnails of images, or imgcat, which lets you preview images in the terminal. You can also use this feature in your own applications. I used it a while ago to quickly analyse the output of my DSP algorithms (you can find the source code on my GitLab page). ...

November 1, 2024 · 4 min · Patryk Miszczak-Malesiński

London vs. classical approaches to unit testing

What is a good unit test? There are several characteristics of good unit tests. In short, they should prevent regressions, they should be isolated from other components and other tests, they should be repeatable (if the test is isolated, it is also be repeatable), they should be fast and they should be stable, so that changes to the production code don’t require large changes to the tests. We also need to be aware that we don’t write tests to generate costs, but to reduce them. That way, we’ll be more confident about making changes, so we can release faster, and we won’t slow down as much over the course of the project. ...

October 22, 2024 · 6 min · Patryk Miszczak-Malesiński

Code Katas

There is a lot about what code kata is on the web, but I will allow myself a brief introduction anyway. Code kata is simply a coding exercise. It’s your testing ground for learning new technologies, frameworks, and libraries, as well as comparing different approaches, without the pressure of a real-world project. Your goal is to create a minimal implementation of some project, allowing you to focus on specific learning objectives. The excercise should not take too much time (I prefer to not exceed 1 hour). You can skip some practices that you would do in a real project, such as input validation, authorization, etc., and focus on what’s important to you right now. However, I recommend that you continue writing tests, especially in the TDD approach. ...

September 1, 2024 · 4 min · Patryk Miszczak-Malesiński
Mastodon