Matt Brown content for you

Migrating Spotify's backend to Kubernetes

A few months back I was interviewed on Google’s “Stack Chat” YouTube channel about migrating Spotify’s backend to Kubernetes.

Personalization at Spotify using Cassandra

I cowrote a blog article about things my team at Spotify has been working on the past few months, primarily focused on how we use Cassandra.

How to type the ⌘ (Command) key in OS X Mountain Lion

This was harder than I expected it to be:

  1. Press ⌘ ⌥ T to bring up the Character Viewer.
  2. Click the gear menu (⚙) to bring up options and choose “Customize List…”
  3. Under Symbols, check the box next to Technical Symbols
  4. The command symbol (⌘) should be the first in the list.

From here you can drag and drop the ⌘ to whatever text editor you want - although a keystroke to type it would be far easier rather than opening Character Viewer each time.


Is there an easier way to do this?

Update: Yes, there is.

Crazy git error message of the day

$ git submodule add .vim/bundle/vim-scala
fatal: You are on a branch yet to be born

Stackoverflow has a solution for this problem.

Graphing CPU temperature in OS X with Munin

Last week I made a plugin for Munin to collect the temperature of my Macbook’s CPU, hard drive, and GPU, for no real reason other than I thought it would be need to see how they change over time, and because graphs are irresistible.


The plugin is on github. It requires a free app called Temperature Monitor to be installed so the temperature values can be collected in a script (I could not find any way built into OS X to collect the data from the command-line, like you would read /proc on Linux).

How to get iCal to recognize recurring events in iCalendar (ics) files

Here is the solution to a problem I recently debugged which I had a very hard time finding any information on via Google. Hopefully this helps someone else in the future.

When programatically generating iCalendar (.ics) files, iCal on OS X (at least on my Snow Leopard version, 4.0.4) seems to refuse to recognize that the event is recurring if the VEVENT contains a RECURRENCE-ID element.

For an event that should repeat on the first Thursday of the month, iCal would only add the first event if the ICS file looked like this:

SUMMARY:This event should repeat on first Thursday of the month

However, remove the RECURRENCE-ID element and iCal recognizes that this is a recurring event just fine - it adds events on the first Thursday of the month for four months:

SUMMARY:This event should repeat on first Thursday of the month

Outlook 2011 and Google Calendar recognize the first example as hoped for (shows an event that repeats on first Thursday of the month four times). It’s not clear to me from the RFC which behavior is correct - the meaning of RECURRENCE-ID seems confusing.

Cool Mac trick of the day

Highlight a word in almost any app, press Cmd + Ctrl +D, instant dictionary lookup.


Email Privacy Tool

Cool tool that I found today, which tests how much of your privacy your email client leaks when it displays an email (by displaying remote images or other content). Some quick results of different email clients:

  • iPhone 4 iOS 5.1 native mail app, remote images enabled (by default): leaks 17 out of 32 categories
  • iPhone 4 iOS 5.1 native mail app with remote images disabled: leaks 0 out of 32 categories (the winner)
  • Outlook for Mac 2011, remote images disabled: leaks 2 out of 32 categories (audio and video)
  • Mac’s built-in v4.5, remote images disabled: leaks 14 out of 32 categories

Required Code Reviews

Ben Kamens posted today about changing his opinion on required code reviews from the negative to the positive after a change in policy at Khan Academy.

Having moved within a company from a team that had nothing close to approaching a code review policy, to a team that almost-religiously does code reviews on changes regardless of size (with one caveat, it’s not required for someone to “OK” each review/change), I can safely say that having a code review process is a huge bellwether of the overall quality of a software team.

I would never want to work with a team in the future that didn’t already do code reviews. It makes such a huge difference in the quality of the code produced, the level of understanding of each person on the team as to how things actually work, and education among people on the team in all sorts of ways (on best practices, tips and tricks, cultural things the team prefers, etc). It doesn’t slow you down, or increase the amount of process - it just makes sense.

As a developer, looking at code all day is what you should be doing in the first place anyway.

Khan Academy’s official policy on code reviews is a good read too.

How to verify a PGP signature with GnuPG

In case you are an idiot like me, here is a simple set of steps for verifying a PGP signature (for example, if you are downloading the TrueCrypt installer and you want to verify that the binary is intact).

If you already have GnuPG or another PGP client installed, skip steps 1 and 2.

  1. Install GnuPG - on my Mac with MacPorts, I ran

    $ sudo port install gnupg
  2. Create your private key with

    $ gpg --gen-key

    Accept all of the default options.

  3. Download the public key of the person/institution you want to verify. For TrueCrypt, their public key is available here.

  4. Import the person’s public key into your key ring with:

    $ gpg --import TrueCrypt-Foundation-Public-Key.asc

    (change the filename to whatever is appropriate).

  5. You need to sign the person’s public key with your private key, to tell PGP that you “accept” the key. This contains a few steps on it’s own:

    1. List the keys in your keyring with

      $ gpg --list-keys

      The output will look like:

      pub   1024D/F0D6B1E0 2004-06-06 uid
                        TrueCrypt Foundation  
      sub   4077g/6B136ECF 2004-06-06 
    2. The “name” of their key is the part after “1024D/” in the line

      pub   1024D/F0D6B1E0 2004-06-06
    3. Sign their public key with:

      $ gpg --sign-key F0D6B1E0
  6. Now you can verify the signature of the file you downloaded. With TrueCrypt and it’s installer, this command was:

    $ gpg --verify TrueCrypt\ 7.1\ Mac\ OS\ X.dmg.sig

    which outputted:

    gpg: Signature made Thu Sep  1 11:50:54 2011 EDT using DSA key ID F0D6B1E0
    gpg: Good signature from "TrueCrypt Foundation "