Date: 2026-02-15

Recap of Daily Source Reading, v0.1

Early Recap

So, I've been doing this daily source reading only recently. But enough to get a good feel for it. I think I am at a point where I do get a different appreciation for the code I use everyday.

We all use the tools everyday, if we know it or not. We have all used ls, sed, sudo=/=doas, sh, bash, and even fucking mundane looking tools like yes.

But as this series has shown, even seemingly simple stuff like yes can have wildly different code.

In our normal developer lifes we take these tools for granted, without ever thinking how they might work. And that is only touching the userland tools.

On the kernel side, there is soooooo much more going on. And there is not enough written material about it. Yes, there are some books, but none of them actually get into the details.

Some of the code is kinda of commented, but it's commented by the actual developers, with a different background. They only comment the stuff they needs commenting.

Is it worth it?

Yes. I absolutely think it is worth reading the code. This series had a slight bias towards preferring OpenBSD code so far, but that is because they keep it simple.

The FreeBSD or Linux code is also worth the exact same to read, but requires a bit more work due to the optimizations.

We will over time definitely flip between the systems and also compare them, but you will have to bear with me, as I am also learning along the way.

I am by no means an Operating Systems developer (was at one point while working on the MOSA Project though, but at that time I was mostly working on the compiler parts).

But so far, reading the code, comparing it between systems has taught me a lot. And I highly recommend to any developer to do the same. For now, I am sticking with this series on Operating Systems, but it's not a restriction. I might veer into compilers, or certain libraries.

But taking foreign code and treating it like a code review, disecting it, understanding it, has been an absolute pleasure.

Daily? Really?

Yes. Daily!

I might skip a day here or there because life just throws curve balls. But if I start calling it "random code reading" or "eventual code reading", I will never write anything. The title is my driver. There will definitely be days where I might skip it, but I will follow those up with something nice.

So don't take the daily too literally, just go with the flow. Similar to workouts. Train to failure, and take a rest when needed. But keep pushing it when you can.

Disclaimer

I might have forgotten to mention this when starting the series, but here we go:

I am a bumbling fucking idiot

I have never done any serious work on Operating Systems and I have the highest respect for any OpenBSD, FreeBSD, NetBSD, Linux, Solaris or insert other system developers. Anyone even remotely participating deserves the utmost respect.

Nonethless, I might seemlingly bash against a system here or there, but it's coming from a first viewer point. Feel free to rant at me or call me out whenever needed. I'd actually appreciate it.

Buuuuut….

With the amount of different platforms, different drivers, different protocols, different limitations, the entire undertaking of creating something even remotely usable is a daunting task. A very daunting task.

The goal of this series is to maybe lift the veil a little bit. At the end of the day we are all just cooking with water.

Is implementing security difficult? Yes, but also no. pledge is an example that shows that implementing basic security isn't that difficult.

Goal

First of all, my goal is very selfish if I am honest. I just want to understand the systems I am working with better.

But these same systems are struggling for volunteers.

I would argue that participating on the Linux scheduler was easier in the 90s than it is today. The code and the architectures have evolved, and so did the scheduler.

A lot of the code is tribal knowledge, and shall remain so, unless we examine it. Yes, for now the focus is OpenBSD and FreeBSD, but we will also explore NetBSD and Linux and even XNU down the road. Maybe even Plan9, if we finally wanna look at good code :D

Feedback

Please, by any means, shoot me some feedback about what you want do dive into next and I will see what I can do. Specific code parts, or comparisons or discussing tradeoffs.