<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Fredrb&#39;s Blog</title>
    <link>https://blog.fredrb.com/</link>
    <description>Recent content on Fredrb&#39;s Blog</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 02 Jun 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blog.fredrb.com/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Fun with Futex: building my own mutex in C for funtex</title>
      <link>https://blog.fredrb.com/2025/06/02/futex-fun/</link>
      <pubDate>Mon, 02 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://blog.fredrb.com/2025/06/02/futex-fun/</guid>
      <description>&lt;h1 id=&#34;fun-with-futex&#34;&gt;Fun with Futex&lt;/h1&gt;&#xA;&lt;p&gt;Implementing an optimized lock in Linux requires some Operating System help. You can only get so far by doing everything in user-land. We are going to take a look how one can implement a simple spin lock in C (just like the &lt;a href=&#34;https://blog.fredrb.com/2022/10/16/go-concurrency-simple-lock-impl&#34;&gt;spin lock in Go&lt;/a&gt; I implemented a while back) and then a slightly more elaborate lock using operating system&amp;rsquo;s primitives. The idea behind a mutex (mutual exclusion) is straightforward: we want some part of the code to be accessed only by a single thread at a time. If the resource a thread is trying to access (the critical zone) is already being accessed by something else: wait. The trick about implementing them is &lt;em&gt;how&lt;/em&gt; you to do wait part!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Solving the same problem multiple times</title>
      <link>https://blog.fredrb.com/2023/09/08/same-problem-multiple-times/</link>
      <pubDate>Fri, 08 Sep 2023 00:00:11 +0200</pubDate>
      <guid>https://blog.fredrb.com/2023/09/08/same-problem-multiple-times/</guid>
      <description>&lt;h1 id=&#34;solving-the-same-problem&#34;&gt;Solving the same problem&lt;/h1&gt;&#xA;&lt;p&gt;I have gotten into the habit of solving the same problem multiple times. Whenever I start working on a new feature or fixing a bug, I revert my code until I write a solution that I&amp;rsquo;m happy with.&lt;/p&gt;&#xA;&lt;p&gt;The first code is always a draft. My mental model is similar to writing a text. The first pass will rarely get published. Each section gets many rewrites. Sometimes the entire thing gets thrown out. I don&amp;rsquo;t get nit-picky about the choice of words until after the structure is in place. The same thing happens with code. I rewrite it until the code organization feels right. Only then I start working on making the code tidy (i.e. adding additional comments, naming things better and removing redundancies).&lt;/p&gt;</description>
    </item>
    <item>
      <title>On bash one-liners: unmaintained go.mod dependencies</title>
      <link>https://blog.fredrb.com/2023/08/13/bash-one-liner-gomod/</link>
      <pubDate>Sun, 13 Aug 2023 00:11:11 +0200</pubDate>
      <guid>https://blog.fredrb.com/2023/08/13/bash-one-liner-gomod/</guid>
      <description>&lt;h1 id=&#34;bash-one-liners&#34;&gt;Bash one liners&lt;/h1&gt;&#xA;&lt;p&gt;I have a graveyard of &lt;em&gt;one-time-use&lt;/em&gt; bash one-liners that become either aliases or get wrapped by shell functions in my &lt;code&gt;.zshrc&lt;/code&gt; file. I often justify the effort of polishing them and adding to my dotfiles with the excuse that they will be used again in the future. Even if they are never used again, they serve as a library of examples. For every new command, there is always an old one that did a similar thing.&lt;/p&gt;</description>
    </item>
    <item>
      <title>On sound programming: Playing a single note with SDL2</title>
      <link>https://blog.fredrb.com/2023/08/08/audio-programming-note-sdl/</link>
      <pubDate>Tue, 08 Aug 2023 00:11:11 +0200</pubDate>
      <guid>https://blog.fredrb.com/2023/08/08/audio-programming-note-sdl/</guid>
      <description>&lt;h1 id=&#34;playing-a-single-note-with-sdl2&#34;&gt;Playing a single note with SDL2&lt;/h1&gt;&#xA;&lt;p&gt;I have successfully avoided sound programming for all my programming life. Even when I tried making games, sound was always an afterthought. However, recently I got a new pair of headphones, and wondered: &amp;ldquo;what makes sound good?&amp;rdquo;, or &amp;ldquo;how much of the quality can be improved by hardware?&amp;rdquo;, and even &amp;ldquo;what is the structure of a sound file?&amp;rdquo;. If you&amp;rsquo;re looking for answers to all these questions — sorry, you are in the wrong place. I don&amp;rsquo;t have them (yet). But I can offer something equally fun: make your computer play a note by writing less than 100 lines of C code.&lt;/p&gt;</description>
    </item>
    <item>
      <title>A case for Go code generation: testify</title>
      <link>https://blog.fredrb.com/2022/11/06/testify-code-generation/</link>
      <pubDate>Sun, 06 Nov 2022 10:11:11 +0200</pubDate>
      <guid>https://blog.fredrb.com/2022/11/06/testify-code-generation/</guid>
      <description>&lt;h1 id=&#34;a-case-for-go-code-generation-testify&#34;&gt;A case for Go code generation: testify&lt;/h1&gt;&#xA;&lt;p&gt;&lt;em&gt;Discussion(s): &lt;a href=&#34;https://lobste.rs/s/ouszvj/case_for_go_code_generation_testify&#34;&gt;lobste.rs&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;If you’ve been using Go for a while, you’re probably familiar with the testing library &lt;a href=&#34;https://github.com/stretchr/testify&#34;&gt;stretchr/testify&lt;/a&gt;. It makes it easy to write tests and provides several assertion functions, such as &lt;code&gt;Equal&lt;/code&gt;, &lt;code&gt;Contains&lt;/code&gt;, &lt;code&gt;Greater&lt;/code&gt;, and &lt;a href=&#34;https://pkg.go.dev/github.com/stretchr/testify/assert#pkg-functions&#34;&gt;many more&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Assertion functions behaves differently depending on the scope. For example, when called from the &lt;code&gt;assert&lt;/code&gt; or &lt;code&gt;require&lt;/code&gt; package. The former logs the error and continue, while the latter stops the test immediately. Both packages offer the same function signatures. Assertions are also called as methods from a &lt;code&gt;suite&lt;/code&gt; struct, which wraps the &lt;code&gt;*testing.T&lt;/code&gt; pointer. And each assertion has a formatting counterpart with a &lt;code&gt;*f&lt;/code&gt; suffix and additional (&lt;code&gt;msg string, params ...interface{}&lt;/code&gt;) parameters at the end.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Concurrency in Go: simple lock implementation</title>
      <link>https://blog.fredrb.com/2022/10/16/go-concurrency-simple-lock-impl/</link>
      <pubDate>Sun, 16 Oct 2022 10:12:11 +0200</pubDate>
      <guid>https://blog.fredrb.com/2022/10/16/go-concurrency-simple-lock-impl/</guid>
      <description>&lt;h1 id=&#34;simple-lock-implementation&#34;&gt;Simple lock implementation&lt;/h1&gt;&#xA;&lt;p&gt;This is a simple &lt;code&gt;sync.Locker&lt;/code&gt; implementation in Go for learning purposes. This is not a lock to be used seriously.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve been reading about concurrent programming, and I&amp;rsquo;m going to walk through some examples I found in the book &lt;em&gt;The Art of Multiprocess Programming&lt;/em&gt; on lock implementations that helped me understand the inner workings of locks.&lt;/p&gt;&#xA;&lt;p&gt;Locks are an important construct of concurrent programs. However, they are a lower level concept compared to channels and the Go teams recommends the latter whenever possible. From the documentation in the &lt;code&gt;sync&lt;/code&gt; package:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Concurrency in Go: shared memory</title>
      <link>https://blog.fredrb.com/2022/10/15/go-concurrency-shared-memory/</link>
      <pubDate>Sat, 15 Oct 2022 16:33:11 +0200</pubDate>
      <guid>https://blog.fredrb.com/2022/10/15/go-concurrency-shared-memory/</guid>
      <description>&lt;h1 id=&#34;concurrency-in-go-shared-memory&#34;&gt;Concurrency in Go: shared memory&lt;/h1&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve been playing around with some examples to better understand how Go&amp;rsquo;s memory model behaves on concurrent programs. I&amp;rsquo;m going to try and explain what I&amp;rsquo;ve learned regarding operation ordering on multi-core CPUs.&lt;/p&gt;&#xA;&lt;p&gt;The example I&amp;rsquo;m going to show is an extension of the &lt;em&gt;Message Passing&lt;/em&gt; example written by Russ Cox in his &lt;a href=&#34;https://research.swtch.com/hwmm&#34;&gt;Hardware Model post&lt;/a&gt;. After reading it I wanted to experiment with this behavior and see it for myself. This is the result.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Character encoding and UTF-8</title>
      <link>https://blog.fredrb.com/2022/07/31/character-encoding-utf8/</link>
      <pubDate>Sun, 31 Jul 2022 20:50:43 +0200</pubDate>
      <guid>https://blog.fredrb.com/2022/07/31/character-encoding-utf8/</guid>
      <description>&lt;h1 id=&#34;character-encoding-and-utf-8&#34;&gt;Character encoding and UTF-8&lt;/h1&gt;&#xA;&lt;p&gt;Here are some quick facts I learned about character encoding, ASCII and UTF-8:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You need to know the encoding of any text, otherwise it’s impossible to decipher the message (although it’s common for applications to assume the encoding).&lt;/li&gt;&#xA;&lt;li&gt;ASCII standard character set uses 7 bits only (&lt;code&gt;0x00:0x7F&lt;/code&gt; range). This allows for 128 character only.&lt;/li&gt;&#xA;&lt;li&gt;The upper 128 positions (&lt;code&gt;0x7F:0xFF&lt;/code&gt;) can be used by other encodings that preserve the first 128 ASCII characters and add new characters. There are many 8bit charsets that use the same first 7bits from ASCII.&lt;/li&gt;&#xA;&lt;li&gt;&lt;del&gt;Unicode provides a unique code for &lt;em&gt;every&lt;/em&gt; character, regardless of the language.&lt;/del&gt; This might not be entirely true. A combination of Unicode values can map to a single character. Additionally, there are some characters which are &lt;a href=&#34;https://www.unicode.org/standard/unsupported.html&#34;&gt;unsupported&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;UTF-8 is not an 8bit character mapping! It takes a single byte to encode ASCII characters, but other characters can take up to 4 bytes in their representation. Each hex code maps to an Unicode cod point.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;why-do-we-need-encoding&#34;&gt;Why do we need encoding?&lt;/h2&gt;&#xA;&lt;p&gt;A text file is just bytes to a computer. What differentiates a file with text content to any other binary file is how the reader interprets it. In order to decode a file, the program must know its encoding. If it doesn’t, it&amp;rsquo;s a meaningless sequence of octets. However, if the reader knows how the files is ASCII encoded, each octet in the file represents a single English letter or a symbol according to the ASCII table.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Investigating man-db internals</title>
      <link>https://blog.fredrb.com/2022/06/30/man-db-internals/</link>
      <pubDate>Thu, 30 Jun 2022 17:01:40 +0200</pubDate>
      <guid>https://blog.fredrb.com/2022/06/30/man-db-internals/</guid>
      <description>&lt;h1 id=&#34;investigating-man-db-internals&#34;&gt;Investigating &lt;code&gt;man-db&lt;/code&gt; internals&lt;/h1&gt;&#xA;&lt;p&gt;From time-to-time I get nerd-snipped into understanding the internals of some system, library or any technology I use. This time, &lt;code&gt;man&lt;/code&gt; was the target. I&amp;rsquo;ve discovered that &lt;code&gt;man-db&lt;/code&gt; uses a DB (maybe that&amp;rsquo;s why there is DB in the name?) to index command names to some metadata, allowing quicker lookups on &lt;code&gt;whatis&lt;/code&gt; and &lt;code&gt;apropos&lt;/code&gt; commands.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Technically, &lt;code&gt;apropos&lt;/code&gt; is just a symlink to &lt;code&gt;whatis&lt;/code&gt; and they work very similarly to each other.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Writing a Hash Table in Go</title>
      <link>https://blog.fredrb.com/2021/04/01/hashtable-go/</link>
      <pubDate>Thu, 01 Apr 2021 00:00:00 +0000</pubDate>
      <guid>https://blog.fredrb.com/2021/04/01/hashtable-go/</guid>
      <description>&lt;h1 id=&#34;writing-a-hash-table-in-go&#34;&gt;Writing a Hash Table in Go&lt;/h1&gt;&#xA;&lt;p&gt;Inspired by the recent post from &lt;a href=&#34;https://benhoyt.com/writings/hash-table-in-c/&#34;&gt;Ben Hoyt&lt;/a&gt;, a recent refresher of Computer Science fundamentals and my journey on learning the Go programming language, I&amp;rsquo;ve implemented a hash table in Go.&lt;/p&gt;&#xA;&lt;p&gt;Hash Table is a great data structure, they are to Balanced Trees what linear time sorting is to comparison sorts. By not relying on the comparison model, they allow you go below the &lt;code&gt;log n&lt;/code&gt; lower bound for searching provided by Balanced Trees. Hash Tables allow you to do constant time look-ups and amortized constant time addition and deletion. This means that adding and deleting items will take mostly &lt;code&gt;O(1)&lt;/code&gt;, but some operations might take a little longer (i.e. &lt;code&gt;O(n)&lt;/code&gt; for rehashing). This isn&amp;rsquo;t a big problem though, as we will see later in this post, if we choose our strategies well, we can assume that this won&amp;rsquo;t happen very often and for most operations we will run in constant time. &lt;/p&gt;</description>
    </item>
    <item>
      <title>Tiny Python Docker Images</title>
      <link>https://blog.fredrb.com/2020/11/24/tiny-python-docker/</link>
      <pubDate>Tue, 24 Nov 2020 00:00:00 +0000</pubDate>
      <guid>https://blog.fredrb.com/2020/11/24/tiny-python-docker/</guid>
      <description>&lt;h1 id=&#34;tiny-python-docker-images&#34;&gt;Tiny Python Docker Images&lt;/h1&gt;&#xA;&lt;p&gt;I was looking for a way to create a very small docker image for a Python project. The python project I created is a Telegram bot quizzes me in German. The &lt;code&gt;python-telegram-bot&lt;/code&gt; pip package requires &lt;code&gt;gcc&lt;/code&gt; to fully build- so using alpine image did not do the trick for me. I searched online, found a few example bot none that would actually do what I needed with a reasonable image size.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rediscovering Roguelike Games</title>
      <link>https://blog.fredrb.com/2020/05/29/rediscovering-roguelike-games/</link>
      <pubDate>Fri, 29 May 2020 00:00:00 +0000</pubDate>
      <guid>https://blog.fredrb.com/2020/05/29/rediscovering-roguelike-games/</guid>
      <description>&lt;h1 id=&#34;rediscovering-roguelike-games&#34;&gt;Rediscovering Roguelike Games&lt;/h1&gt;&#xA;&lt;p&gt;I’m not a hobbyist Game Designers. Perhaps I was on that path ten years ago when my friend and I had an idea for the next World of Warcraft and we would put it to practice. We hadn’t, and we didn’t. The passion for building something of my own is still there though. Maybe different, less grandiose and more reasonable. What keeps pulling me back to Game Development is the technicality of it rather than design. Can’t lie, I occasionally get myself thinking in games I could build. But my attention constantly shifts from game design to its technical aspects.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Microservices and Object Oriented Programming</title>
      <link>https://blog.fredrb.com/2019/11/14/oo-microservices/</link>
      <pubDate>Thu, 14 Nov 2019 00:00:00 +0000</pubDate>
      <guid>https://blog.fredrb.com/2019/11/14/oo-microservices/</guid>
      <description>&lt;h1 id=&#34;microservices-and-object-oriented-programming&#34;&gt;Microservices and Object Oriented Programming&lt;/h1&gt;&#xA;&lt;p&gt;Sam Newman defines in his book &lt;a href=&#34;https://www.amazon.com.br/Building-Microservices-Designing-Fine-Grained-Systems-ebook/dp/B00T3N7XB4&#34;&gt;Building Microservices&lt;/a&gt; (2015) that there are two key traits that make a good service in a Microservice Design: (1) &lt;strong&gt;Loose Coupling&lt;/strong&gt; and (2) &lt;strong&gt;High Cohesion&lt;/strong&gt;. These two traits have been previously raised in the context of Object-Oriented Design by authors such as Robert C. Martin, Martin Fowler and Sandi Metz. But what makes Object-Oriented Design and Microservices converge into these two design principles? The simplest answer can be: &lt;strong&gt;Message Passing&lt;/strong&gt;. Both Microservices and Object-Orientation have Message Passing as their core for communication between its atomic entities. Where atomic entities is the &lt;em&gt;cellular like organism&lt;/em&gt; that lives in each paradigm, being &lt;strong&gt;Services&lt;/strong&gt; for Microservices and &lt;strong&gt;Objects&lt;/strong&gt; for Object-Oriented Programming.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Optimizing ZSH on WSL</title>
      <link>https://blog.fredrb.com/2019/10/03/optimizing_zsh_on_wsl/</link>
      <pubDate>Thu, 03 Oct 2019 00:00:00 +0000</pubDate>
      <guid>https://blog.fredrb.com/2019/10/03/optimizing_zsh_on_wsl/</guid>
      <description>&lt;p&gt;I have recently switched my machine at work from Linux to Window (for many reasons that are beyond this post). And to keep using some of the tools I&amp;rsquo;m familiar with, I turned to WSL (Windows Subsystem for Linux). It is reasonably good for the most part&lt;a href=&#34;#footnotes&#34;&gt;¹&lt;/a&gt;. One thing that was not so good, was the initialization time of &lt;code&gt;zsh&lt;/code&gt;, which was taking roughly &lt;em&gt;20s&lt;/em&gt; when opening on WSL. I have used &lt;a href=&#34;http://fredrb.com/2018/07/08/lightweight-node-versioning/&#34;&gt;zprof&lt;/a&gt; in the past to identify why &lt;code&gt;zsh&lt;/code&gt; was taking so long to start on my Linux machine, so I did the same now for my WSL setup.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Subscription Model, Metrics, Monitoring and Software-as-a-Service</title>
      <link>https://blog.fredrb.com/2019/07/23/subscription_model/</link>
      <pubDate>Tue, 23 Jul 2019 00:00:00 +0000</pubDate>
      <guid>https://blog.fredrb.com/2019/07/23/subscription_model/</guid>
      <description>&lt;p&gt;Today I&amp;rsquo;m going to ramble about Metrics, Monitoring, SaaS (Software-as-a-Service) and the Subscription Business Model. Topics I&amp;rsquo;ve been reading and discussing about for the last few weeks. The topic that calls for special attention is the Subscription Business Model. This model has been affecting our industry drastically, specially if we look around from a consumer perspective the idea of subscription services is almost ubiquitous. Netflix, Spotify, Salesforce, GitHub, Amazon, Google, these companies cover quite a few of the areas of SaaS for different industries. And this is just on the Software side of things. There are tons of companies selling subscription boxes, flying tickets and bikes.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Automating this Blog</title>
      <link>https://blog.fredrb.com/2019/04/27/automating_blog/</link>
      <pubDate>Sat, 27 Apr 2019 00:00:00 +0000</pubDate>
      <guid>https://blog.fredrb.com/2019/04/27/automating_blog/</guid>
      <description>&lt;p&gt;I haven&amp;rsquo;t really written much for this blog. But one thing that really gets to me every time I write a post is the way I publish it. When I first created this site, it wasn&amp;rsquo;t for the blogging itself, it was more the experience of hosting my own website. I was going to put the first blog post on GitHub pages but I ended up creating my own website infrastructure.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Node Versioning - A lightweight version manager for Node</title>
      <link>https://blog.fredrb.com/2018/07/08/lightweight-node-versioning/</link>
      <pubDate>Sun, 08 Jul 2018 00:00:00 +0000</pubDate>
      <guid>https://blog.fredrb.com/2018/07/08/lightweight-node-versioning/</guid>
      <description>&lt;p&gt;&lt;em&gt;Skip to the final result: &lt;a href=&#34;https://github.com/fredrb/nv&#34;&gt;GitHub Repository&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;JavaScript and the NodeJS ecosystem have never been my favorite technologies in a stack, but I have managed fine in the last four years of professional and personal projects. With the growing need to manage application releases and parallel projects using Node, the lack of version manager such as Ruby&amp;rsquo;s &lt;code&gt;rvm&lt;/code&gt; was indisputable. I was alone back then, and was managing different Node versions myself. Luckily the community had already provided a project called &lt;code&gt;nvm&lt;/code&gt;, which had a very similar interface to &lt;code&gt;rvm&lt;/code&gt;. Me and &lt;code&gt;nvm&lt;/code&gt; got well together and became good friends, as I was with my former buddy &lt;code&gt;rvm&lt;/code&gt; in the past. Things went pretty well for a good couple of years until I had to travel to other technologies and we stopped talking. Fast forward to a few months ago, I was setting up a new workspace, and decided to reach out to &lt;code&gt;nvm&lt;/code&gt; again, due to the fact I was about to start another project using node. Unfortunately, the experience was not as joyful.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ruby Monkey-Patch and Design Decisions</title>
      <link>https://blog.fredrb.com/2017/11/07/monkey_patch_and_design_decisions/</link>
      <pubDate>Tue, 07 Nov 2017 00:00:00 +0000</pubDate>
      <guid>https://blog.fredrb.com/2017/11/07/monkey_patch_and_design_decisions/</guid>
      <description>&lt;p&gt;Ruby is a wonderful language. Despite the &lt;a href=&#34;http://blog.cleancoder.com/uncle-bob/2016/05/01/TypeWars.html&#34;&gt;type wars&lt;/a&gt; between static and dynamic (typing/checking) or that some say it might &lt;a href=&#34;http://www.virtuouscode.com/2014/02/23/rumors-of-rubys-demise/&#34;&gt;be dying&lt;/a&gt; (which I don&amp;rsquo;t agree with), I just find Ruby a great language to learn. Its readable and has features that hooked me from the start. I never used it on a big project or anything professionally. But I learned enough of it to send some pull requests to Ruby projects on GitHub and also develop solutions for the &lt;a href=&#34;http://adventofcode.com&#34;&gt;advent of code&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Understanding /proc</title>
      <link>https://blog.fredrb.com/2016/10/10/understanding-proc/</link>
      <pubDate>Mon, 10 Oct 2016 00:00:00 +0000</pubDate>
      <guid>https://blog.fredrb.com/2016/10/10/understanding-proc/</guid>
      <description>&lt;h1 id=&#34;understanding-proc&#34;&gt;Understanding /proc&lt;/h1&gt;&#xA;&lt;p&gt;Last week I created a small &lt;code&gt;ps&lt;/code&gt; clone in ruby.&#xA;This was done purely out of curiosity, just wondering &lt;em&gt;how&lt;/em&gt; does &lt;code&gt;ps&lt;/code&gt; works and how it knows all about current running processes. &lt;a href=&#34;https://github.com/fredrb/ps-clone&#34;&gt;You can find the project here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Cool things I learned in the process:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;procfs&lt;/code&gt; is a virtual filesystem that stores process data!&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ps&lt;/code&gt; clone is merely file reading (really).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;exploring-procfs&#34;&gt;Exploring &lt;code&gt;procfs&lt;/code&gt;:&lt;/h2&gt;&#xA;&lt;p&gt;At first, I went around the web and read about &lt;code&gt;ps&lt;/code&gt; and Linux processes. This happened to be the first time I was introduced to &lt;code&gt;procfs&lt;/code&gt; reading about it in &lt;a href=&#34;http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html&#34;&gt;TLDP&lt;/a&gt; (awesome documentation btw).&lt;/p&gt;</description>
    </item>
    <item>
      <title></title>
      <link>https://blog.fredrb.com/cv/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://blog.fredrb.com/cv/</guid>
      <description>&lt;h1 id=&#34;resume&#34;&gt;Resume&lt;/h1&gt;&#xA;&lt;p&gt;I’m a Software Engineer and Computer Science Graduate excited to explore and develop new technologies.&#xA;I thrive on tackling complex problems and working on them with my peers. Believer on the practice of writing&#xA;better code rather than more code and occasional contributor to Open Source.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Programming Languages I&amp;rsquo;m comfortable with:&lt;/strong&gt; Go, Python, Java, Rust, Bash and JavaScript/TypeScript&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Programming Languages I don&amp;rsquo;t use often:&lt;/strong&gt; Ruby, C#, C++, Elixir, Scheme (Racket) and Clojure&lt;/p&gt;</description>
    </item>
    <item>
      <title></title>
      <link>https://blog.fredrb.com/projects/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://blog.fredrb.com/projects/</guid>
      <description>&lt;h1 id=&#34;personal-projects&#34;&gt;Personal Projects&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://github.com/fredrb/htable&#34;&gt;Hash Table implementation&lt;/a&gt;&lt;/strong&gt;: implemented a Hash Table in Go while revisiting&#xA;some CS concepts (Reviewed by &lt;a href=&#34;https://benhoyt.com/&#34;&gt;Ben Hoyt&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://github.com/fredrb/gameboy-emulator&#34;&gt;Game Boy Emulator&lt;/a&gt;&lt;/strong&gt;: recently took a huge interest in Emulator Development. This project&#xA;is my second attempt at trying to create an emulator for the Game Boy familiy of consoles. This one is developed in Rust, and a huge part of the&#xA;code is a debugger for the GB CPU instructions.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://github.com/fredrb/chip-8&#34;&gt;CHIP 8 Emulator&lt;/a&gt;&lt;/strong&gt;: first implementation of an Emulator (in Rust) of the popular Hello World of Emulators.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://github.com/fredrb/roguelike-game&#34;&gt;7DRL Game&lt;/a&gt;&lt;/strong&gt;: after reading about the 7DRL challenges and playing a lot of Roguelike Games in itch.io, I decided to&#xA;run a self-imposed challenge of creating this game in 7 days. I wrote a &lt;a href=&#34;https://blog.fredrb.com/2020/05/29/rediscovering-roguelike-games/&#34;&gt;blog post&lt;/a&gt; about my experience and also published the game on &lt;a href=&#34;https://fredrb.itch.io/dragons-and-dungeons&#34;&gt;itch.io&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://github.com/fredrb/docker-terraform-cf&#34;&gt;Terraform Cloud Foundry provider Docker Image&lt;/a&gt;&lt;/strong&gt;: while struggling with setting up pipelines that would deploy Terraform scripts using the Community Cloud Foundry provider, I created this docker image to be used in CI/CDs. Since in my current job we use SAP&amp;rsquo;s Piper library for all pipelines, the examples show how to use the image in a Piper environment. But theoretically it should work in any CI/CD.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://github.com/fredrb/nv&#34;&gt;Node Versioning&lt;/a&gt;&lt;/strong&gt;: after having many performance problems on my &lt;code&gt;zsh&lt;/code&gt; initialization due to &lt;code&gt;nvm&lt;/code&gt; calls, I wrote my own minimalistic node version manager. I wrote about it &lt;a href=&#34;http://localhost:1313/2018/07/08/lightweight-node-versioning/&#34;&gt;here&lt;/a&gt;. Fun fact: 3 years later I still use my own homebrew version.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://github.com/fredrb/ps-clone&#34;&gt;ps clone&lt;/a&gt;&lt;/strong&gt;: while learning more about Linux and Ruby I wrote a clone to the UNIX &lt;code&gt;ps&lt;/code&gt; command. It was the content of my very first &lt;a href=&#34;http://localhost:1313/2016/10/10/understanding-proc/&#34;&gt;blog post&lt;/a&gt; and the only time I got to &lt;a href=&#34;https://news.ycombinator.com/item?id=12641155&#34;&gt;Hacker New&amp;rsquo;s front page&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://github.com/fredrb/codepen-downloader&#34;&gt;Codepen Downloader&lt;/a&gt;&lt;/strong&gt;: one of my first personal projects: a command line tool in JavaScript to download and uplpoad CodePens.&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
  </channel>
</rss>
