One of my servers has a weird problem after every reboot: it can ping IP addresses just fine, but it can’t resolve any DNS names. $ ping 8.8.8.8 # works $ ping google.com # ping: google.com: Temporary failure in name resolution I’ve been working around this for a while now: after every reboot I’d SSH in and overwrite /etc/resolv.conf to point straight at 8.8.8.8 instead of the…
Today I had almost 9 hours of downtime on fedidevs.com and some of my other sites that I run on a Raspberry Pi at home. The alert came in just as I was heading to bed and I didn’t see it until I woke up this morning 🫣 Since Jake on Mastodon asked for a Cloudflare-style postmortem, here it is: Incident report: ~9h loss of upstream connectivity on the raspberrypi host Date: 2026-05-12 /…
I have two Raspberry Pis at home. One hosts my various sites including fedidevs.com and the other supports it by storing backups of all the configs and data. This includes a streaming hot standby of the Postgres database that powers some of my sites. I am not (yet) brave enough to run Claude on my primary Pi, but I decided to let it loose on my secondary. Doing an in-place dist upgrade on a…
Last week I attended the Agents Day Hackathon in Lisbon. It was a full day of talks, socializing, and building agents. Talks There were a few talks and a round table discussion during the hackathon. The most memorable one for me was about the challenges behind Cloudflare’s 16 MCP servers. All 2500+ Cloudflare endpoints couldn’t fit into a single MCP server, since listing them all used…
Before the conference My partner and I arrived in Athens a few days before the conference. It was a convenient excuse to visit a European capital we hadn’t been to yet, and of course to eat as much delicious food as possible. Django Social One day before the conference I went to the django.social event organized by Jon Gould and Andrew Miller . The bar they initially picked got too crowded,…
With all the supply chain attacks happening lately ( litellm being the most recent example) keeping dependencies up to date without risk has been on my mind. Below is everything I do to keep my personal projects secure, what we do at Fencer to keep our own codebase secure, and what we recommend to the startups we work with. Be hesitant about what you add The best way to reduce the risk of…
At Fancer we are building the security suite for startups. Startups use a lot of SaaS tools and services which means we are building a lot of integrations. Most of these go through API calls but we also try to leverage SDKs to make our lives a little bit easier. The problem we started noticing was that loading all these 3rd party integrations has made our Django app feel very sluggish. While this…
The first version of Django was released about 10 years before Python standardized its type hints syntax . Because of this it’s not surprising that getting type hints to work in your Django project is not going to be trivial. django-stubs with mypy If you want your Django codebase to be type checked then django-stubs is the go to package to use. It ships both type-stubs for most of…
I received this bug report in a toot from a Fedidevs user: Dear @fedidevs I think there is a bug with the starterpacks: When in “Add accounts” I search for an account that is already in the Pack, the tick-box can show empty. When I click it, it will switch to ticked, but the account is actually removed from the pack. This is also confirmed by the number of accounts in the pack going…
In my last post I mentioned that software engineering is going to be more and more AI driven and since then I’ve begrudgingly accepted this new reality. The era of handcrafted code is mostly coming to an end. I say mostly because I still believe there will always be places in our future codebases that require manual intervention. Little surgical removals and additions around the parts where…
December is the time for Advent of Code, as it has been since 2015, when the first Advent of Code event was published. This year, Advent of Code only had 12 days instead of the usual 25. To me, this was a relief. I always get competitive and then start waking up at 5 am every day to get more points on the leaderboards. I did the exact same thing this year as well, of course, but at least I only…
Recently, I had to write a Django migration to update hundreds of thousands of database objects. Loading the data With some paper-napkin math I calculated that I can fit all the necessary data in memory, making the migration much simpler than it would have been otherwise. First I had to make sure to load only the necessary columns. Django’s only queryset method came in very handy:…
I migrated one of my Django apps from Gunicorn to Granian yesterday. Here is how the migration went and some of my thoughts on Granian and Gunicorn. Migration This is the second time I attempted to try out Granian. The first time I got blocked because Granian didn’t support unix sockets . I run several Django apps on the same host behind Nginx, and I’m using Unix sockets for…
Even though my team has been diligent with mocking external requests, a few web requests still managed to slip through after a few months of cranking out new features. We only noticed them when our tests started to fail . 🫣 The mocking problem Usually, when you write a test for code that makes network requests, you mock your HTTP library of choice, either by using the built-in unittest.mock…
Django 5.2 added a new warning that shows up when you start your development server with python manage.py runserver : WARNING: This is a development server. Do not use it in a production setting. Use a production WSGI or ASGI server instead. For more information on production servers see: https://docs.djangoproject.com/en/5.2/howto/deployment/ Here is how it looks like in the terminal: The warning…
This blog has been a static site powered by Jekyll for over 13 years , and I’ve been happy with the setup. After all this time, I still enjoy using my code editor to write new posts and git commit and git push to publish them. However, there was one issue that often discouraged me from writing: I had to switch out of the code editor to generate the Open Graph image that appears on social…
Adding special syntax to Javascript or Python to allow Go-like error handling feels like a good idea at first glance, but I think it doesn’t improve the issues with error handling in these two languages.
pip sometimes returns a checksum error when the urllib3 library is unable to parse a received TLS packet due to a network error. This pip issue will be resolved in 2025 when Python 3.9 is EOL, but you can get around it today by using wget or curl.
This article shows how to achieve zero-downtime deploys of your Django, Flaks, or FastAPI app using only Gunicorn. It explains how to reload the Gunicorn process with the -HUP signal using systemd or the kill command directly making sure no requests are dropped during the upgrade.
I am helping a client upgrade their Django application to Python 3.10 and we encountered this mysterious warning when running the app on the new Python version: < frozen importlib . _bootstrap > : 914 : ImportWarning : _SixMetaPathImporter . find_spec () not found ; falling back to find_module () To make matters worse, this warning doesn’t only show up once, but more than 200 times when we…
At my day job we have a Django app with almost 500_000 lines of Python code that was written over the last decade. Ever since we migrated to Python 3.7 (almost seven months after Python 2 EOL 😓), we’ve tried to keep on top on Python upgrades. We migrated to 3.9 at the end of last year, skipping 3.8 completely. It was now time for us to jump on Python 3.10.
In the last article we learned how important it is to reduce the friction in code reviews, by making code reviews your top priority. Based on the theory of constraints , not working on the bottleneck is counterproductive. If your code review queue is backed up, writing more code will not make you deploy features any faster! The theory of constraints doesn’t only help us figure out what to…