> Category: Programming

Just enough Makefile to be dangerous

Over the years, I've developed a mix of appreciation and frustration for make. While it's conveniently ubiquitous across UNIX systems and widely used, its syntax often feels perplexing and unwieldy, posing debugging challenges. In this article, I share best practices I've embraced to make working with make a more satisfying experience.

Pinning your SQLite version across environments

This article discusses the challenges of maintaining consistent versions of the SQLite library in different environments for a project that relies heavily on it. Unlike traditional databases, where server versions can be easily pinned, SQLite is embedded in applications, leading to potential feature mismatches due to what version is made available by each environment's system package manager.

How to profile a FastAPI asynchronous request

In this article, I share the challenges I faced when trying to profile requests in an asynchronous FastAPI server. The traditional profiler, cProfile, provided inaccurate results due to the nature of asynchronous functions, which resulted in misleading statistics. To overcome this, I explored pyinstrument, a statistical profiler with built-in support for asynchronous Python code.

Preventing a pull request from being merged until it's safe

Sometimes, a pull request is ready to go, but shouldn't be merged before some other changes are merged first. While the patch is valid on its own, it might depend on other changes, and could even break the application if merged before the other. I'll demonstrate a simple technique relying on Github Actions and pull request labels to block a pull request from being merged, until deemed safe to do so.

Generating pretty maps ready to be gift-wrapped

Lyon, FranceI have been toying with the idea of generating visually pleasing maps centered on a given address, to have them printed and framed. The way I see it, it would make an original and personalised gift for the person living there. So when Marcelo de Oliveira Rosa Prates' prettymaps blew up on Reddit, I decided to try it.

Monitoring my solar panel power production

I have recently acquired two solar panels from Sunology advertising a cumulated instantaneous production of up to 810W. The panels come with a smart plug emitting the data to Tuya, in order to retain and graph historical data. However, the only available granuarity for that data is daily kWh production. In order to optimize the orientation and placement of the panels, as well as measure the production efficiency (power produced / 810 * 100), I needed a much finer granularity than that. I decided to query the data myself and send it to Datadog.

Speeding up a 21h job to 8 minutes: a story of SQLAlchemy optimization

In this article published on the Alan tech blog, we explain how my team has reduced the runtime of our longest nightly job from 21h to about 8 minutes, by using simple profiling and SQLAlchemy optimizations.

Measuring the coverage of a rust program in Github Actions

In this article, I will go through how I set up code coverage measurement for bo, my text editor written in Rust, and publicly hosted the coverage report on S3.

Tools I'm thankful for

Software engineers sometimes have a reputation for being overly critical when it comes to tools and programming languages. The web is full of rants, heated debates and articles about what technology is "better" and which is "crap". It was thus refreshing to read an post titled Software I'm thankful for, that shone a light on some pieces of software in a positive light. In honor of this article, I've decided to go through the same exercise.

Sending a webhook from Synology DSM to Discord

Given the fact that running a Datadog agent on a Synology Play NAS is not obvious, I wanted to enable Discord webhooks push notifications (as this is where my Datadog alerts are already being sent). This way, I'd get plenty of alerts "for free" without having to configure new Datadog …