Igor Bubelov
About Blog Notes Photos

August 2021

Notes ยท Aug 30, 2021

Table of Contents

Docker Compose and Systemd

There are many good reasons why Docker Compose is popular among developers and self-hosting enthusiasts. It may lack some features of a “world scale” orchestrator, but it’s much easier to use and configure than something like Kubernetes. I tended to use Docker Compose pretty much everywhere up until recently, but now I prefer Systemd. It may sound like comparing apples to oranges, but Systemd can do a lot of things Docker Compose does in a much cleaner fashion.

The thing is: if you have a Linux server, it’s probably based on Systemd, and there might be no good reasons to install any additional dependencies. Avoiding extra dependencies isn’t the only reason to stick with Systemd, though. Generally, installing two invasive systems competing to do the same thing is a recipe for a disaster. Many Docker Compose users are unaware about the fact that it messes with their firewalls, and many learned about it the hard way. Up until recently, even installing Docker Compose on something not too mainstream, like Raspberry Pi, was so nuanced and confusing that it deserved a special post in this blog. Finally, it’s impossible to avoid Systemd nowadays, but it’s pretty easy to avoid Docker Compose, so why clutter your mind with two things when you can get away with just one?

Docker itself (without Compose) is very handy when you need to deploy something extremely complicated (often, for no good reason). For instance, Nextcloud is essentially a bunch of PHP scripts which require a lot of dependencies and some painful manual setup. It could have been a simple executable, but it’s not. That’s where Docker shines: it allows us to hide messy to deploy software behind a simple CLI. Setting things up is a hard job which might need deep expertise. Docker can abstract that away, just tell it what port to bind to, and it’ll take care of the rest. Go and Rust have set a good trend of packing everything into a single binary, which makes Docker unnecessary for a typical single-node self-hosted deployment. I hope more software will be distributed like this in the future, but for now, it’s pretty much impossible to avoid Docker itself.

Debian 11

I have to confess, most of my servers and workstations run Ubuntu, but I always have at least one Debian machine. One of the features that tipped the scale to the Ubuntu side is the lack of proper WireGuard support in Debian 10. I also have a fleet of Raspberry Pi servers, and they’re all Ubuntu-based, since it’s the only properly supported server distro (Raspberry Pi OS is too niche, and it mostly focused on education). I don’t think I’ll migrate my Pi’s to Debian any time soon, bit I’m planning to give it a go on my main laptop and desktop.

Speaking of my desktop, it has a Zen 3 CPU and Debian 11 comes with a kernel v5.10. Luckily, 5.10 is the first kernel with full Zen 3 support. That was a close call, but it looks like it’s going to work just fine, and it won’t have any missing features.

vim

My vim journey progresses at a slow and steady pace, and I still have mixed feelings about it. It really changed the way I code and how I experience the whole process. I guess those changes are mostly due the fact that I don’t use code completion. It makes me think about code on a lower level, which is actually surprisingly exciting, at least for now. Another observation that pleased me was my laptop’s battery life. GUI-based IDE’s tend to consume far more power, but I can easily code in vim all day on a single charge. I still have a lot to learn, but I’m already productive enough to not feel that using vim slows me down in any way. There is no hurry now, so I’m planning to learn new vim tricks at a much slower and relaxed pace from now on.

SQLite Strict Column Typing

I love SQLite because maintaining “real” database is a lot of work for little to no gain in projects that don’t need to deal with high loads and multi-node deployments. If you didn’t work with SQLte, you might be surprised how fast and scalable it actually is. Unfortunately, it can also be surprising in much less pleasant ways. For instance, SQLite didn’t support RENAME COLUMN till the beginning of 2021! I’m glad it’s fixed now, but the biggest remaining problem with SQLite, in my opinion, is the lack of strict typing. It has this obscure concept of type affinity, and it allows you to insert data of any type into column of any type. It sounds bad, and it’s really as bad as it sounds. That’s why I’m super excited about this new feature:

https://www.sqlite.org/draft/stricttables.html

Hopefully, dynamic column types will soon become a thing of the past.

PlayStation

Just a reminder on why closed hardware and software shouldn’t exist. I have PS4 and its Wi-Fi module started to misbehave. I didn’t pay much attention to it, because I don’t play online games anyway. Well, it looks like my console wants to contact Sony’s licencing servers every 15 minutes and if it can’t do it, it just kicks me out of my games. I ended up switching to wired connection, but I won’t ever buy nor recommend any Sony garbage, at least until they stop treating their paying users as fucking criminals.

Book: The Demon-Haunted World

Science is a beating heart of a modern world, but some people believe that it’s in decline now. That would be disastrous, if true. There is no shortage of conspiracy theories telling us stories ofi some shadowy elite that hides important knowledge from the public. It looks like the reality is even more cynical: all the important knowledge is public, but finding it is like finding a needle in a haystack. We’re constantly bombarded by all kinds of information and filtering all the noise, lies, errors, biases and speculations have never been as important as it is now.

Carl Sagan tried to popularize scientific thinking in an attempt to prevent the world from diving back into the darkness it emerged from not so long ago. This book tells us a lot of stories about science and pseudo-science, and about how hard it might be to separate one from another. Personally, I share many of the author’s concerns. It’s hard not to worry about the decline of science and rationality when people burn 5G towers, refuse life-saving vaccines and fall victims of populist politicians en masse. I’m not even talking about uneducated populations of some third-world countries. Those things seem to be on the rise everywhere.

To summarize, I think this book is still relevant despite its respectable age. I’m looking forward to reading more books of Carl Sagan.

Podcast: Blockstream Talk

Blockstream is one of the most recognized names in the Bitcoin space, and I don’t think any other company can match them in terms of added value to the whole ecosystem. Those guys keep contributing code to Bitcoin repo, and they’re also heavily involved in building infrastructure around Bitcoin. There is a reason why this company is valued at a few billion USD, after all.

One of the recent Blockstream contributions to the Bitcoin community is their new podcast. The first episode features Adam Back, and it’s focused on the history of ideas and technology behind Bitcoin. This episode isn’t technical, the conversation focuses on the origin story of Bitcoin and the reasons why it was invented. It also covers how it works, especially compared with its predecessors, but don’t expect many nitty-gritty details on that. Ironically, Adam Back would be one of the best folks to ask about those details, but I’m now sure it’s the trajectory this podcast wants to pursue.

Unfortunately, this podcast doesn’t seem to have a website and a standalone feed, so here is a YouTube link:

https://www.youtube.com/watch?v=b7QT6km2hGs

Game: Bloodborne

I’ve been playing Bloodborne before, but I didn’t manage to complete it yet. Now I’m already reached the last location, but I decided to explore chalice dungeons before triggering the end of game. Well, I’m just scared of trying it again, so I decided to level up my character first. Anyway, this game is really cool and its extremely re-playable. It reminds me Diablo series, and I wish Diablo 3 was more like Bloodborne. The main difference is the source of re-playability. Diablo games are focused on trying different characters and “builds”, but there is no such thing in Bloodborne. Instead, the main cause of excitement is higher uncertainty when it comes to fight. In Bloodborne, even the weakest enemies can easily kill you, if you make a mistake. It encourages players to stay sharp and engaged. Also, collecting items is less addictive in Bloodborne, and it feels like a good thing.