Ulam Spiral

The Ulam spiral is a graphical depiction of a set of prime numbers devised by the mathematician Stanislaw Ulam1. To quote the Wiki, it’s constructed by writing the positive integers in a square spiral and specially marking the prime numbers. The outcome is a square with distinct diagonal, horizontal, and vertical lines. This post will walk through the development of a Ulam spiral visualization tool. Creating a Ulam Spiral Take a look at the 4x4 Ulam spiral below:...

May 2, 2024 · 8 min · Ivan Eduardo Guerra

Caesar Cipher

The Caesar Cipher1 (CC) is a classic symmetric key2 algorithm dating back to the time of Julius Caesar. If you are new to cryptography, the Caesar Cipher is a great first crypto algorithm to learn. This post will walk through the details of implementing a CC encrypt/decrypt function. You’ll then get a look at the internals of a CC code cracker. Algorithm Description There are four key ingredients to a Caesar Cipher:...

April 9, 2024 · 10 min · Ivan Eduardo Guerra

Notes On "Linux Kernel Development"

This is the third installment in a series of posts where I share notes taken while reading an interesting book or article. This post includes the notes made while reading the book titled “Linux Kernel Development” by Robert Love. Getting Started The following are key differences between userspace application development and Linux kernel development: No access to the C library or C headers. There are versions of certain libc functions included in the kernel under lib/....

April 4, 2024 · 31 min · Ivan Eduardo Guerra

An Interview with Shared Pointers

Have you implemented a shared pointer class in C++? If you have, did you do it in an interview setting? You might be familiar with the STL shared_ptr and the fact that many implementations of shared_ptr use reference counting to manage the lifetime of a dynamically allocated object. That said, if you’ve never thought about or tried to actually implement the concept itself, doing so in an interview is a tall order....

March 9, 2024 · 7 min · Ivan Eduardo Guerra

Linux Kernel Development Using QEMU

This article gives an overview of how to setup a Linux kernel development environment that leverages QEMU. Why should you bother with this setup? Here are the highlights: Make changes to core kernel code or modules without the risk of loading buggy kernel code onto real hardware. Up the speed of the edit, build, run cycle while developing kernel code. The ability to test code across different architectures (for example, aarch64, x86_64, etc....

February 20, 2024 · 8 min · Ivan Eduardo Guerra