Archive
-
Climbing a depth-first search hill, Advent of Code 2024, day 10
Today, we’re diving into the Day 10 puzzle. Like Day 6, it’s a 2D grid, but this time, we need to consider multiple paths. It’s fascinating to see how depth-first search comes into play here. Each point on the map is represented by a single-digit integer indicating its height, ranging from 0 to 9, with…
-
How to parse computer code, Advent of Code 2024 day 3
Having tackled some of the later Advent of Code challenges, I wanted to revisit Day 3, which presented an interesting parsing problem. The task involved extracting valid code from a noisy input, a great exercise in parser and lexer development. Join me as I explore my approach to this challenge. When I first wrote about…
-
How to repair a bridge, Advent of Code 2024 Day 7
After what felt like an eternity (five hours, to be precise), Day 20 part 2 finally decided to cooperate. I’m still slightly dazed from the wait, but duty calls! Today we’re tackling Day 7 of Advent of Code, picking up where we left off with Day 6 last week. Our task today is to repair…
-
How to trace steps in a map, Advent of Code 2024 day 6
Back to my Advent of Code challenge, due to some unforeseeable issues, I am unable to complete the challenges in time and am currently about 5–6 days behind. However, I am still determined to complete the puzzles this year. Today, let’s discuss the 6th puzzle. Looking for things in a 2D plane seems to be…
-
Video data IO through ffmpeg subprocess
As I restarted my job search (yes, I am still #OpenToWork, ping me!), in one of the job applications, I was asked to implement a prototype that processes video data. While working through the project, I unexpectedly got a lot of help from generative AI chatbots due to my relatively inexperience in the area. As…
-
How to code a Sorting Algorithm for Advent of Code 2024 day 5
In the previous post, I briefly mentioned that I am participating in this year’s Advent of Code. Co-incidentally, in one of the puzzles, specifically the one published on day 5, involves fixing the order of pages in a list. This came not long after I posted about implementing a sorting algorithm, so I figure I…
-
Why does everyone love sorting algorithms?
I had an interview a few weeks ago, and was asked to implement a sorting algorithm. I didn’t manage to do it on the spot, but managed to revise and sent it back in my follow-up email. That was my second time implementing a sorting algorithm, the first was during my play through of Human…
-
Building state machine library with help from AI tools
Just out of boredom, while waiting for my follow-up interview sessions, I built a state-machine library, powered by genruler. I built one in the past, to be exact, during my first job after graduation. This implementation is loosely based on the design my supervisor drafted back then. The project also aimed to showcase how the…
-
Remaking a rule-engine DSL
A few years ago, I reimplemented a domain-specific language (DSL) originally designed for the rule engine at work. The toy reimplementation was written in Javascript (originally in Python), and released to GitHub. I did not expect it to do much, as it was specifically designed for a very specific use-case I should not reveal. The…
-
Building a desktop launcher
I still use QuickSilver on my mac, despite there are multiple efforts attempting to displace it. There used to be one made for Linux, called Gnome Do, however the development eventually stopped. I settled for the built-in launcher in Gnome Shell, and then briefly moved on to rofi with this configuration. One thing I liked…