Welcome to my Dev Notes!
This website is a collection of articles I've written on various topics:
- Programming - things related to programming languages or frameworks, e.g. .NET C#, Angular, Functional Programming, and others...
- Technology - topics include Linux, Kubernetes, MongoDB, and many other, hopefully interesing, pieces.
Updates
Transition to Astro
Hey there! So, my website has been running on VuePress (v1) since the beginning. It’s been pretty good, but let’s face it, it had some shortcomings. VuePress websites are Single Page Apps (SPAs), which means there’s a lot of JavaScript involved. That’s fine for interactive sites, but for a content-focused website like this one, it’s not ideal. That’s where Astro comes in, a framework that puts performance first.
I’d been keeping an eye on Astro for a while, and when it reached version 2, I thought it was the perfect time to switch this website from VuePress to Astro. The transition went smoothly, and here’s a quick overview of what I had to tackle:
Building core components: Astro doesn’t come with built-in features like navbars, sidebars, or tip boxes, which VuePress does. So, I rolled up my sleeves and created them myself.
Code syntax highlighting: VuePress has a nice out-of-the-box syntax highlighting configuration, while Astro provides only the default code syntax coloring. To get specific line highlighting, I had to craft a custom component.
Recreating the theme: My site’s theme used to be coded into VuePress, intertwined with its default theme. Switching to Astro gave me the chance to clean things up, and now I’m in the process of transitioning it to Tailwind CSS.
One of Astro’s coolest features is Content Collections. It lets you organize content by splitting it into different types (for me, it’s “articles” and “posts” like this one). Each type can have its own TypeScript-typed metadata, making it easy to fetch content along with its metadata and work with it in various ways. This feature came in handy when building components like the Sidebar.
To wrap it up, Astro is pretty awesome for static websites that focus on content. If that’s what you’re looking to create, I’d definitely recommend giving Astro a try.
Tracing
I’ve added an article about one of the pillars of Observability in modern distributed cloud systems - Tracing. Tracing is nowadays a part of the OpenTelemetry standard, it’s the part of the standard that is the most stable and well-defined. Tools like Jaeger alrady implement the standard, so it’s the right time to jump on board, and start tracing out apps using OpenTelemetry SDKs. You can find the article here.
Overview of SELinux
I added an overview of the SELinux subsystem, which is one of the popular MAC systems that are available on Linux. It’s used mostly in the Red Hat world (Red Hat Linux, Fedora), but can also be found on other Linux distributions (also on Android). I was interested in the topic mostly due to the fact that Podman relies on SELinux when mounting volumes. Lack of any SELinux knowledge might lead to issues when containers try to access the mounted files. While learning about SELinux, I found it to be quite an interesting topic. You can see my gist of it here.
Angular Content
I’ve been studying Angular for a few weeks now. Although I’ve used this technology numerous times in the past (e.g., in my master thesis), it’s been a few years ago and I naturally forgot most of the things, even the basics.
Anyway, since I need Angular again for one of the projects that I’m working on, I had to pick it up again, and as a result, an Angular Series was born. I’m still working on it, especially on the NgRx bits, but the whole thing is at around 90% level of completion. I already see myself going back to some parts of it as I’m starting to use Angular, which proves that it’s useful. I hope it will be useful for you as well.
I have to admit that I was very Vue-focused in the last years, and I didn’t think I’d be ever switching to anything else. I’m not so sure anymore! Angular is definitely more involved, it requires you to write more boilerplate code (it’s changing with Standalone Components!), but it’s also very well structured and it kind of reminds me a bit of ASP.NET Core’s way of doing things.
For small quick projects I’d probably stick with Vue.js, but for bigger ones, Angular could be a great alternative.
ASP.NET Core Materials
ASP.NET Core is such a fundamental technology in the projects that I work on that I decided to write an overview of it. In the process, I have looked into the parts that I do not normally utilize (like Razor Pages). It was an interesting journey that helped me to put my knowledge of the ASP.NET Core framework in order. My main interest in the ASP.NET Core land has always been the Web APIs and most of the knowledge in my article series is applicable to that.
You can find the articles here.
Helm
Kubernetes is such a commonly used technology nowadays that various tooling and solutions have been born around it. One of them is Helm. In one of the projects I’ve been working on professionally, I had to make use of Helm. Well, I didn’t really have to, but it turned out to be the easiest solution. A part of my task was to deploy WordPress onto a K8s cluster. Solution offered by Bitnami was so simple that I decided to dig a bit deeper into Helm. As a result, I packaged another app with Helm making its deployment easier. An additional result is an Overview of Helm that I’ve written. I know I will be getting back to it anytime I need to use Helm. Hopefully, you will find it useful as well.
Overview of Rust
There seems to be a lot of hype around Rust recently. Especially in the Linux community, Rust seems to be gaining popularity. One of the reasons for it is the GTK 4 toolkit and the gtk-rs bindings project for it.
I wanted to explore why that language became so popular, so I decided to learn it, at least on a beginner level. The lessons I’ve learnt have been noted in the Rust Series.
I think the language is quite interesting and its heavy focus on memory safety
has high impact on how the programmer writes code. You have to kind of switch
your mental model to what Rust requires and rememeber that variables should be
modified in one context only. There also seems to be a lot of ideas from
functional programming that Rust devs like to use, and Rust has some utilities
built-in to make it easier to apply them (like the Result
monad). What I
really liked was the match
keyword and the ease of returning data with it.
It’s important to note though that Rust is quite a difficult language. There’s
lots of things to keep in mind, especially when it comes to sharing data between
functions (even more difficult in parallel context). Personally, I still prefer
the ease of C# and freedon of JavaScript/TypeScript over Rust, but I can see why
many people seem to love it nowadays.
While learning Rust, I’ve purchased the Rust in Action from Manning. I got so used to high quality of Manning publications and I did not expect any surprises in that area. However, with that book, it seemed to me like the author was delivering the content out of order, and it was just unbearable for me. I stopped in the middle, and picked up the official Rust book. I have to admit, it’s one of the best tutorial books I’ve ever read, and it cannot even be compared with the Manning one.
The best way to learn any new programming language is to actually write some code. I did just that and created a small CLI utility called Puff. It is a fairly simple tool allowing you to manage certain files (like configs) in a central place with the help of soft links.
If you want to learn Rust, I suggest that you go through the Rust Book. My content is a brief summary of that book.