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

The Sierpinski Triangle

Do you remember when you first learned about recursion? The thought triggered a memory from an old CS101 Java course. The textbook had some fractal triangle thing made with only 20 lines of code. At the time, it was a confusing 20 lines of code. A quick search on Google for “fractal triangle recursion” led straight to the Sierpinski triangle1. A Sierpinski triangle generator with an ncurses visualization is a fun afternoon project....

February 7, 2024 · 6 min · Ivan Eduardo Guerra

Signing Git Commits With GPG

If you’ve been around the open source community long enough, you’ve probably heard of people signing their VCS commits/tags. This post covers the why and how of signing your Git commits. The focus will be on commits but keep in mind that these tips equally apply to tags. Why Sign Your Commits The short answer is, signing your commits makes it harder for an attacker to impersonate you. Sure, if you work solo on rinky-dink toy projects, having your commits signed isn’t a big deal....

January 21, 2024 · 6 min · Ivan Eduardo Guerra

Dotfile Mgmt With GNU Stow

Do you have a bunch of dotfiles? Do you maintain a GitHub repo1 with all your dotfiles? Whenever you upgrade your machine, do you find yourself manually placing the dotfiles in the right spots in your home directory? If you answered yes to these questions, read on. Enter GNU Stow GNU Stow2 is a dotfile management utility. Stow has all the makings of a varsity athlete3: Stow is small (a 32KB Perl script)....

January 20, 2024 · 2 min · Ivan Eduardo Guerra