Use SF Mono Outside of Terminal and Xcode

I really like the SF Mono font Apple includes in Sierra and High Sierra (even more than Menlo), but for some reason it’s only available inside of Terminal and Xcode. So I’m out of luck when I’m writing in MarsEdit, BBEdit, or any other third party app. Fortunately, you can just copy the font from Terminal’s app bundle and install it so it’s available everywhere.

Run this command from the Terminal and you’re all set:

cp -R /Applications/Utilities/Terminal.app/Contents/Resources/Fonts/. /Library/Fonts/

You could also ⌘-G in Finder and copy the files over that way if you prefer.

I Bought a $60 Smart Water Bottle and It’s Sort of Cool

As of yesterday I believe I have hit peak millennial. It happened when I received my Hidrate Spark 2.0 smart water bottle in the mail. I wanted to start drinking more water, so I’d been using an app to track how much I drink for a few days. The app was fine, but it was easy to forget to do it every time I drank something and kind of a pain. The bottle tracks everything I put in it, syncs over bluetooth, and then saves it using HealthKit. So far it seems to work pretty well.

If you have an extra $60 and want to drink more water, it’s not the worst thing you could do.

Life Update

Astute readers/listeners/friends may have noticed that I haven’t published a new blog post or put up a podcast episode in the last couple months. And, there are reasons for that. I’ve been meaning to get everything going again, but life has managed to get in the way, so I thought I’d post a quick update.

First off, I am no longer living in San Francisco. I moved from San Francisco to Seattle in September to work for Sonos. It’s been a great fit. I love the people I’m working with, the products we make are super cool, and I’m really excited for the future for the future of the company. I’ve always been a big audio nerd, and have loved speakers, microphones and all of that. There aren’t a ton of opportunities as an iOS developer to work at a company that bridges both of those things, so this has felt like a great fit.

As for my podcast, I recorded an episode right before I left which I need to edit and put up. I’ll be booking more guests going forward and will try to get back on a regular weekly schedule. It’s a lot of work to manage, but I love doing it. I let life get in the way more than I should have, but I’m going to try to fix that.

Anyway, that’s me.

Podcasting Gear (July 2017)

I’ve switched about my gear quite a bit since I started podcasting, and I think things sound pretty good. I thought I would go ahead and share what I’m using, what I like about my current setup, and what I might change in the future.

Microphone: Heil PR-40

The mic that I’m currently using, and that I’ve used on most episodes of The Run Loop is a Heil PR-40. I like the sound of it pretty well, although sometimes think it might be a little too hyped sounding. The thing I really like about it how much rejection it has for anything that’s not in front of it. Considering I’m recording in a small downstairs apartment with loud upstairs neighbors, that’s pretty essential.

I was using a Shure SM7b for a couple episodes but didn’t like it so much because it picked up a lot of room sound and the very low output made it a bit challenging to deal with, even with nice preamps.

On the episode with Bob, I used an Electro-Voice N/D767a for his voice, and on the latest episode with Michele Titolo I used a Shure SM58. They both seemed about as good but I’d probably give the edge to the Shure.

Headphones: Sony MDR7506

Although the hyped high end makes these a little weird to use if you were going to try to mix on them, I love the Sony MDR7506 for tracking. I have less trouble with bleed getting into the mic than I did with the Sennheiser HD 380 PRO, and they don’t need anything special to drive them. That’s pretty much what I’m looking for in tracking headphones. As a bonus they also look extremely cool.

Audio Interface: Focusrite Clarett 4Pre

I traded my Apogee Duet 2 for this, and for the most part it’s a great upgrade. Comparable sound, 4x as many inputs, and way better software. Plus it actually has knobs. The Duet had one knob that you needed to click to change what it did.

The only thing I don’t like about the Clarett as much is that the built in preamps have less gain available at 57dB vs the Duet’s 75dB. It’s totally sufficient for most things though; the Duet just had more headroom.

I would absolutely recommend the Clarett to anyone looking for an interface in this general price range. The value it gives for the cost is just nuts. Really pleased with it.

Preamp: API 512c

At $900 a channel, plus requiring a $650 box to put it in, I can’t really recommend this unless you have a lot of money and want something truly professional, or plan on recording music as well. For podcasting, the built in preamps in a decent interface are going to be great, but I already had this, so why not use it?

Software (DAW): Logic Pro X

I used Pro Tools way back in the past, but I’ve been on Logic for many years now. I have custom presets saved for most things and muscle memory for the key commands. I really like this app and I’m pretty good with it.

Other Gear

Wrapping Up

If I make any significant changes I’ll try to post what they are and why I switched. Right now I think my gear is pretty sufficient though and I’m going to try to focus on just making great episodes with what I’ve got for a while.

Counting Bits in an Integer

During a tech screen I was given the task of writing a function to count the number of bits in an integer given. I thought I’d share what I came up with.

#include <stdio.h>

int count_bits(int i) {
    int bit_count = 0;
    int comparator = 0x1;

    for (int x = 0; x < sizeof(int) * 8; x++) {
        if (comparator & i) {
            bit_count++;
        }

        comparitor <<= 1;
    }

    return bit_count;
}

int main(int argc, char *argv[]) {
    // 1
    printf("%d\n", count_bits(1));
    // 2
    printf("%d\n", count_bits(3));
    // 4
    printf("%d\n", count_bits(0x00011101));
    return 0;
}

I don’t know if there’s a better way to do this, but what I did create a comparator with 1 bit (0x1), loop through the number of bits in an int (sizeof(int)*8), do a bitwise AND to see if that bit is flipped in the int I’m counting against, and then shift left one and do it again.

Putting Code on Dropbox

On the latest episode of Under the Radar, David mentioned that he stores all of his code in Dropbox, rather than pushing and pulling to a Git repo to sync between his machines. Of course, he’s not an animal, so he also uses Git, just not for syncing between his personal machines.

I’ve never done this but once he said it, I was pretty much convinced and moved all of my code to a folder on Dropbox. Why wouldn’t I want the current state of my work, including what branches I was working on locally that I haven’t necessarily pushed to GitHub to be kept in sync so everything I need to work is automatically wherever I am?

In fact, if I’m just working by myself on a project by myself, I don’t even need to push it to GitHub at all until I want to share it with someone else in order to get the benefits of having my code backed up externally and kept in sync across my machines?

Am I crazy, missing something, or was everyone else already doing this?

If Object-Oriented Programming Were Announced Today

Graham Lee has a post titled If Object-Oriented Programming were announced today:

Here’s an idea: the current backlash against OOP is actually because people aren’t doing OOP, they’re doing whatever they were doing before OOP. But they’re calling it OOP, because the people who were promoting OOP wanted them to believe that they were already doing OOP.

Basically, Graham argues that a lot of the “newer” paradigms are just OOP by a different name, and that none of us were really doing pure OOP to begin with. You should also check out his talk at UlKonf 2015Object Oriented Programming in Objective-C — where he talks about a lot of the same things in greater detail.

Up First by NPR

The Up First podcast from NPR is a morning briefing show that’s about ten minutes long; meant to catch you up on the most important news of the previous day. I’ve just started listening to it after having it recommended to me, and think it’s great. The episodes are the perfect length to listen to in the shower and pretty information dense.

Hire Me

If you’re looking to hire an iOS developer with over nine years of professional experience for contracting or full time employment, I am now available for either of those things with immediate effect.

Email me at my full name at gmail dot com if you’re interested.