I use a laptop as my primary computer: it’s hooked to my nice keyboard, my nice mouse, and my two monitors. It’s a laptop so that if I need to go on a trip, it’s easy for me to bring my external brain with me. (Admittedly, this is less relevant than it used to be, but this setup is a few years old by now, and it’s also plausible that I’ll need to travel for work again some day.)

The laptop is a fairly nice computer, especially for a laptop. However, I also have really fast desktop computer, without a monitor or keyboard, in a corner of my office, acting as a server. It has a lot more CPU and memory, and way faster storage, than my laptop does. The speed difference between these two machines is quite remarkable.

I use the desktop for heavy tasks, such as compiling Rust programs and running test suites. The desktop has a separate virtual machine for each of my projects, set up just-so for that project. Some of my projects want a specific version of Debian, others need dependencies installed. It’s convenient for me to not have to try to satisfy the environmental requirements for all my projects with one system.

I can create and configure each environment with two commands: one to create it, and one to run Ansible to configure it. I could change my tooling to allow me to achieve both of those in one command. I’ll do that when the two-command approach starts chafing.

It takes me a minute or two to create a new virtual machine from scratch, but it’s all just waiting. I tend to make sure I have tea in my mug during that time.

The actual building and test running is done using a little script that copies my source to the target virtual machine, with rsync, and then runs a command there, with SSH. This turns out to have very little overhead compared to just running the command locally: only a fraction of a second. The build times on the faster machine would make up for the transfer overhead even if it was significantly larger, though.

(I’m not fond of container tooling, so I prefer virtual machines over containers. It’s my external brain, so I get to decide.)