What I learned in 2024

Sun, Jan 12 2025
6 minutes read

Usually, people write this kind of post somewhere at the end of the year. But I had another deadline and haven’t collected my thoughts yet, so this post came quite late. Nonetheless, I really wanted to look back at 2024 because it’s been quite an interesting year for me.

Read more

My desktop customization journey

Fri, Dec 13 2024
7 minutes read

I’m a massive tinkerer, I love breaking things to see why it broke and how to fix them. I prefer breaking software because if it goes too far, I can just reinstall everything. It was a great learning experience, and I’m glad that I had the time and opportunity to do it. As I grow up, messing with software is no longer just for fun and learning, it’s had become a way for me to optimize my workflow, to be more in tune with technology.

Read more

String matching with compile time hash tables

Fri, Nov 29 2024
7 minutes read

I use switch statements a lot in C and even C++. The syntax sucks, but the alternatives are either too verbose (table of function pointers) or don’t express the intention well (if-else chain). It was sad, but I accepted long ago that switch statements only work on numeric types and usually use the alternatives on strings and arrays. But switching on a string has become a common operation for me, and I recently ended up with a reasonably good solution for it.

Read more

Approximating sin(2πx)

Tue, Nov 05 2024
18 minutes read

I use trigonometric functions extremely often, ever since I started doing programming. They show up everywhere, especially in graphics, and while they’re not the most efficient operation, they are widely available in programming languages. This is not the case if you’re programming in embedded systems or WebAssembly, so I tried to compute them myself.

Read more

Introduction to freestanding WebAssembly

Mon, Oct 21 2024
9 minutes read

I’ve been using WebAssembly (WASM) for quite a while, and the learning resources are sparse and incomplete. This is especially true for freestanding WASM, or using WASM directly without using tools that make interacting with the web easier. This is an attempt for me to reflect on what I discovered and hopefully introduce more people to this weird intersection of system programming and web development.

Read more

I switched to Fish as my interactive shell

Tue, Oct 01 2024
4 minutes read

ZSH has been my shell of choice since I started my command-line-centric workflow. It’s a popular shell with a large community and an unprecedented level of customizability. ZSH is also POSIX-compliant, which was very important to me for some reason. However, after some reconsideration, I decided to port my config to the Fish shell, and this is why.

Read more

My personal strategies for arena allocation

Thu, Jun 20 2024
8 minutes read

A drawback that people often mention when programming in C is the lack of RAII. This is sometimes good as it causes me to avoid small, random allocations and incentivize grouping data into large, contiguous memory regions to make them faster and more manageable. However, small, random allocations are sometimes unavoidable, and there should still be a way to manage them. Instead of grouping data into arrays, we can instead group data by their lifetime, and this is where the “arena” allocator comes in.

Read more

A game I made as a course project

Tue, May 28 2024
10 minutes read

I recently programmed a large chunk of the game from scratch for a university course project. This is one of a few projects that I delivered with enough quality and presentability. So I wanted to document my process of making it, what I learned, and how I applied my knowledge from and outside the course.

Read more

Easy, efficient, and practical queue implementation

Sat, Feb 24 2024
6 minutes read

From breadth-first search to task scheduling, queues are extremely useful in computer programming. Although many programming languages support them, I think that it’s important to understand and know how to implement them. I like to implement data structures on-the-fly and customize them for the problem I’m trying to solve. A more practical reason to understand queues is that JavaScript doesn’t have an efficient queue implementation.

Read more

A faster, more flexible alternative to run-time polymorphism in C++ feat. Rust

Sun, Feb 11 2024
9 minutes read

When I first heard about run-time polymorphism in C++ using virtual methods, my first thoughts were like, “This is cool and all, but why would I ever use this?” Then I continued to ignore it because I could always just work around it instead of using it. Until recently, my college lecturer told me that using virtual methods is great for designing and maintaining applications with thousands of objects. I figured that I should write about what run-time polymorphism is, and why I still think that I don’t need it.

Read more

Rewriting my website and starting a blog

Fri, Feb 09 2024
6 minutes read

I already have a website hosted on GitHub pages. It was built around 2 years ago as a way to quickly browse and access my web projects. Basically, it was just a grid of project thumbnails, which is pretty boring. During the last 2 years, I changed bits and pieces of it, but it’s still the same boring layout with only a list of projects and some basic information.

Read more