Automate bug findings with git

🔍 Git bisect When you’re trying to troubleshoot a bug, finding the original commit is often helpful as it gives you context. Enters git bisect! If you haven’t already, consider taking a short detour to the documentation. This command uses a binary search algorithm to find which commit in your project’s history introduced a bug. 🤙 The manual way git bisect works by taking a “good” commit and a “bad” one and from there it will checkout a commit in between....

2021-12-22 · 2 min · 289 words

Chowning files can take a lot of space in a Docker image

Today I learned that recursively changing the owner of a directory tree in a Dockerfile can result in some serious increase in image size. 🚛 The issue You may remember how in a previous post we used a small example to discuss layers and final image size. Well, here’s our example again, slightly modified. # Dockerfile FROM ubuntu WORKDIR /app RUN fallocate -l 100M example RUN chown 33:33 example Given that the base image weighs ~75MB, we could expect the final image to weigh ~175MB (~75 from the base image + ~100 from the big file we generated)....

2021-03-02 · 4 min · 643 words

Lighten your Python image with Docker multi-stage builds

In previous posts we talked about poetry and Docker images layers and I promised I would write about Docker multi-stage builds, so here we go! Note I will explain the basics of Docker multi-stage builds required to understand the post, but I won’t repeat the documentation (see further reading). ⚙️ Multi-stage builds Basically a multi-stage build allows you to sequentially use multiple images in one Dockerfile and pass data between them....

2021-01-02 · 6 min · 1135 words

Poetry for Python dependencies management

At ITSF, teams using the same languages/frameworks regularly meet to share experience and decide on common guidelines. With the Python teams, we recently decided to change our dependencies management system to something more robust because we were not satisfied with pip alone. ✅ Requirements Here’s a list of the features we expected from our new tool: It must manage transitive dependencies1 for us. Developers should only have to specify the direct dependencies of their projects....

2020-12-30 · 6 min · 1119 words

How to use pipx with pyenv

👨🏻‍💻 TL;DR In my case with fish I added this line to my config.fish: set -gx PIPX_DEFAULT_PYTHON "$HOME/.pyenv/versions/3.8.5/bin/python" It’s roughly the bash equivalent for export PIPX_DEFAULT_PYTHON="$HOME/.pyenv/versions/3.8.5/bin/python" 📖 Backstory As a Python developer, my workflow often involves running multiple versions of Python on different projects. To help me in this task, I use pyenv which is a wonderful tool to easily install and manage multiple Python versions on your system. I also have a Python version installed via Homebrew for some formulae that require it....

2020-12-30 · 2 min · 252 words

Docker images layers and cache

In this post, we’ll walk through Docker image layers and the caching around them from the point of view of a Docker user. I’ll assume you’re already familiar with Dockerfiles and Docker concepts in general. ✌️ The two axioms of Docker layers There are two key concepts to understand, from which everything else is deduced. Let’s call them our axioms. Axiom 1 Every instruction in a Dockerfile results in a layer1....

2020-12-28 · 10 min · 1949 words

Replacing my Synology NAS with a self-built server

👴 Old post I don’t use TrueNAS anymore but I still have this machine and I even upgraded the RAM to a more comfortable 56GB. A few weeks ago, I replaced my trusty Synology DS216play with a more powerful station that I built myself. I hadn’t built a computer in a long time and it was a lot of fun! ...

2020-11-11 · 5 min · 977 words

Migration complete

I just moved this blog to my self-hosted server at home. Hopefully nothing is broken but if you see something strange or missing, please contact me! 😃 I also hope we won’t experience any major outages like power (both the server and the router are on UPS) or network. 🤔 I still have a few things to move before decommissioning my VPS but I’d say the hard work is done 👌

2020-11-11 · 1 min · 71 words

Blog platform update - Quick note

I just moved from Writefreely to a custom made blog engine. Writefreely is great but I wanted more control over every bit of the template and style and I couldn’t easily achieve what I wanted. ...

2020-08-17 · 1 min · 138 words

Designing and 3D Printing a Wall Mount for my ISP Modem

I recently moved to a new apartment and now I have a little closet which contains the electrical board. It’s also where the optical fiber comes in and so it’s where I put my ISP-provided modem. For a few weeks, it sat on the floor in this closet since I didn’t have any room for it anywhere else. I wasn’t satisfied, so I decided to design some small pieces to create a wall mount for the beast. #100DaysToOffload No. 16 ...

2020-08-13 · 5 min · 1041 words