Photo by Wyron A on Unsplash

Cheese as a Number

In which we have fun with C’s type system. Building Blocks C is a basic building block of modern computer systems. Operating systems are written using C. Database software is written using C. Drivers are written in C. Saying “cheese” won’t help you when your printer thinks it’s a mouse. What’s problematic about C as…
Read More

Division Without Division

Not all processor architectures support the division operation. What if you’re writing software for one of these CPUs and you need to support arbitrary division? We’re in luck: we can perform the same operations that the CPU would perform. At least this thing can divide… It’s possible to perform division using a combination of left…
Read More
Spinlocks: like regular padlocks, but with more spinning.

Spinlocks and You

Spinlocks are a building block of concurrent programs. As long as you have more than one actor in your system, you’re going to need to be able to control access. We use spinlocks to maintain mutual exclusion – if process 1 is changing something in memory, we want to prevent all other processes from doing…
Read More

Picking Fights in Unity

As a fun summer project, I’m working on a Rogue-like video game. While our overall goal is to keep ourselves entertained while we learn something new, we’re keeping a careful approach to writing our software. Over the last week, we’ve decided it was time to implement combat. Rogue-like Redux If you play video games and…
Read More
An empty stadium

There Is No Delete

I don’t have any Apple devices. I used to own a bunch of them, but over time I’ve switched from an iPhone to a Nexus phone; I have an Android tablet; my laptop and desktop both run Linux. Somewhere along the way, I decided that I should either delete my old Apple ID or remove…
Read More
A dancing robot

Musings on OOP

N.B. This was originally written as a term paper for Portland State University’s CS202 – Programming Systems course. I’ve been working with object oriented programming (OOP) and software development for longer than I’d care to admit. I’ve found OOP to be cumbersome and prone to odd behavior. Shared mutable state has caused me a lot…
Read More

PostgreSQL Data Checksums

If you use SQL Server, you’re used to the database doing page verification for you as the sensible default. If you want SQL Server to┬ánot verify data, you have to do a bit of extra work. Naturally, I would’ve assumed that this was the case with other databases since, after all, having good data on…
Read More

How I Computer

I figured it would be fun to document the hardware and software that I use to get everything done on a regular basis. Even if it’s for nobody but future me, this should be a fun post to review later. Pictured: the computer I actually need. The Desktop I built the desktop computer myself, so…
Read More