Uncategorized

Remapping Keys in Linux

Our Goal: Automatic Remapping This is mainly a reminder so that I don’t forget how I set up automatic key remapping under Linux. Let’s face it: nobody remembers all of the steps to set up a new laptop and I don’t want to spend the same amount of time solving this problem in the future…
Read More
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

Whatever Comes Next

One of the most exciting things about the last few months has been having time to think about what I want to be when I grow up. I kicked around a bunch of different ideas like “Fallout 4 expert” and a bunch of other fun sounding but impractical ideas. None of them seemed to fit.…
Read More

Unsetting Key Bindings in emacs

I make use of emacs – my ability to customize the editor has made it easier for me to be productive. Switching between windows has always been a bit annoying in emacs. After reading Managing Emacs windows, I figured that I would give the ace-window library a try to see if it could solve my…
Read More

Ubuntu and the Sad Chrome Tab

Chrome has a reputation for being incredibly unstable on Linux. It’s been rock solid for me on other platforms, but on Linux (Arch, Ubuntu 14.04 LTS, and Ubuntu 14.10), I run into the “sad tab” multiple times a day. Since I use Chrome as a mail client, music player, word processor, calendar, and television, it’d…
Read More

What Use is an Average?

What’s the point of an average, anyway? Common knowledge (the 1967 Children’s World Book Encyclopedia) states that an average has something to do with an arithmetic mean and/or a “central tendency”. I’m pretty sure that a “central tendency” is a sly sexual reference, so we’ll go back over to mathematics being mean. What’s an Average?…
Read More

AWS Credential Watch

The email started with “Your AWS account is compromised”. That’s the kind of thing that makes you stop whatever you’re doing and sit bolt upright. Amazon Web Services emailed me because one of my secret account keys had been posted to a publicly accessible web page – in this case, it was a github repository…
Read More

Updating a Pull Request

Let’s say you’ve gone and contributed to a project that’s hosted on GitHub. The usual way to do this is to fork the repository, make some changes on a branch in your own repository, and then send a pull requestback to the original author. What if you need to change something after you’ve submitted a…
Read More

Naming conventions are poison.

I’m not referring to sensible naming conventions like “table names are always [singular|plural]” or “method names should be short but descriptive.” Those naming conventions are fine. They’re safe. They protect us from the stupidity of future generations of us (or at least uncaffeinated versions of ourselves). Poisonous naming conventions are the naming conventions that assume…
Read More
Menu