Maciek Flak

Engineer and writer

Maciek Flak

Just a minimalist coder. Notes on Rust, systems, observability, and the tools around them.

Latest notes

Recent writing

Proving SQLx’s Statement Cache with bpftrace

SQLx prepares and caches every query you run, transparently, in an LRU that belongs to the connection rather than the pool. This post traces the Postgres wire protocol with bpftrace to watch what is happening under the hood.

Aligning with rust's Guiding Principle: my path to finding my 'Why'

How does a programming language inspire purpose? In this post, I share my journey of discovering rust's guiding principle—'empowering everyone to build reliable and efficient software'—and how it helped me uncover my own 'why.' From my unconventional start in technology to finding tools that align with my values, this story explores the profound connection between rust's philosophy and my growth as a developer. Along the way, I also highlight some of the best resources that make Rust accessible and empowering for everyone.

Automating the pain away

Some tasks just don't spark joy—they're repetitive, time-consuming, and often stand in the way of meaningful work. Transforming structured markdown notes into Jira tasks is one of those uninspiring chores. While planning, discussing, and iterating with the team is rewarding, manually creating Jira tickets can feel like trudging through UI quicksand. This post delves into how automating these tasks can make your workflow more efficient and enjoyable. By leveraging command-line tools and the power of Large Language Models (LLMs), we explore how to automate Jira ticket creation from structured notes. Not only can this process reduce procrastination, but it also frees up time and energy for more creative pursuits. From scripting and refining bash automation to using LLMs for parsing and script generation, this approach shows that even the most frustrating tasks can be transformed into something seamless. Automate the tedious, embrace the creative, and unlock the true potential of streamlined productivity.

Phantom Menace: memory leak that wasn't there

I share the story of a frustrating debugging journey with a Rust application that was migrated to Kubernetes. Everything seemed fine until a suspected memory leak caused our application to scale uncontrollably. I dove deep into tracing memory usage with eBPF, heaptrack, and jemalloc profiling tools. The real twist came when I discovered that the memory leak was a phantom menace - a misinterpretation of Kubernetes memory metrics rather than a genuine issue. This post details the steps I took, the tools I used, and the lessons I learned about problem-solving, metric accuracy, and effective debugging in containerized environments.

Securing the blog host

🔒 Securing My Server with Tailscale & Systemd! 🔧 I dive into setting up Tailscale VPN on Hetzner to secure SSH access and manage firewall rules effortlessly! 🚀 I also share how I hardened my backend services with advanced systemd settings. Perfect for fellow tech enthusiasts looking to boost server security. 🛡️

Observability: CPU Usage

Analyzing the CPU usage of the system using various tools like uptime, vmstat, mpstat, turbostat, perf, eBPF based tools, runqlat, runqlen.

Blazing fast module 🚀

Expose the blazing fast code using NixOs module and write a fancy integration test.

Measure twice cut once with NixOs

Discover the benefits of using NixOS for building a personal, federated blog in my latest series. Follow along as we explore its simplicity and efficiency.