Skip to main content

Posts

The Apple Delusion

·13 mins

In September 2018 I switched job to work as a remote consultant for a small UK company. Without a work computer, I considered buying a Mac for the following reasons:

  • Ruby development in Windows is a pain
  • I like the UNIX environment
  • The overall user experience, I believed, was top-notch

The other option would have been Linux, but my experiences of macOS had, until that point, been better than my experiences of Linux.

Figuring that I’d want about five years out of the machine, and having worked for too long on too-slow Macs, I dropped € 3,200 (~ $3,719 at the time) on a high-spec 15-inch Macbook Pro1.

Seamless Panes and Splits With Vim

·6 mins

Over the past few months, I’ve been on a bit of a journey through different OSes1, desktop environments, apps, and even editors. Ultimately I settled on Arch Linux + KDE Plasma + Neovim, but I ended up with some different ideas along the way.

One such idea was to ditch tmux and simply use a modern, more featureful terminal emulator. I primarily used tmux for splitting “windows” and its scrollback buffer, but it contributed another layer of abstraction to debug when things like performance, colour support, or displaying images became a problem. Meanwhile, almost any modern terminal emulator can do splits and scrollback buffers.

So I settled on Konsole, which supports all that I need and some other niceties (like ligatures). I set up my key bindings to create splits similarly to those I used in Tmux, and… immediately missed a feature of my tmux setup. This was the ability to switch between tmux panes and vim splits using the same key combination, as though they were in fact the same thing.

Faster Excel Parsing in Ruby

·3 mins

Update: This post originally benchmarked against Xsv v0.3.2, but many performance changes (particularly to memory) were made, so I’ve now benchmarked against v0.3.7 and updated accordingly.


TL;DR: Xsv was ~5 times faster than alternatives at parsing the XLSX file I benchmarked it against, allocating the fewest objects and memory, making it by far the least resource-intensive of all benchmarked gems.


When exporting data for general use, we in the industry are likely to reach for CSV files; they’re basically plain-text, but with a sort-of agreed-upon structure — well, there is RFC 4180 but Wikipedia agrees that implementations are inconsistent at best.