The Main Thread

  1. Ten Years

    It's surreal to think that it's been ten years since I last published anything on this site. To be honest, it feels like both an instant and an eternity. As I aspire to begin writing regularly again after so many years, it seems like a good time to reflect on where I've been and where I am now, if only to get it straight in my own mind.

    Published on December 06, 2025

  2. Core Data in Swift Part 1 - The Stack

    While updating a new Core Data app to Swift 2 I've found a few situations where either there doesn't seem to be any official guidance on best practices, or worse, what I'd consider bad recommendations.

    Published on August 28, 2015

  3. How to Check if You're Running on the Simulator in Swift

    I spend a lot of my time developing iOS apps that work with our web applications. When I run the app in the simulator I want it to talk to the copy of that web application that's running on my development machine and when I run it on a device (or issue a beta build) it should talk to the staging server. Unfortunately, This isn't as simple in Swift as it is in Objective C.

    Published on June 22, 2015

  4. Trim a String in Swift

    I needed to trim whitespace from some user input in a Swift app I'm working on. I could have used the ability to bridge to NSString and called stringByTrimmingCharactersInSet: but doing it in Swift seemed like a fun little exercise.

    Published on April 20, 2015

  5. Simple Auto Layout in Swift

    I haven't had much time to spend with Swift lately but with the release of Swift 1.2 it seemed like a good time to refresh my memory. I have one (very unfinished) project written entirely in Swift that helps me keep track of the changes in the language. This project has come to the point where I can no longer rely on storyboards and nibs for layout so the time had come to look seriously at writing Auto Layout code in Swift.

    Published on February 21, 2015

  6. Free as in Baby

    I've been meaning to write this post but Daniel Compton beat me to it. "It takes a village to raise a library" and "free as in 'baby'" are too perfect not to repeat.

    Published on November 24, 2014

  7. A New Post Script for Jekyll

    The Main Thread is a static site generated with Jekyll. I love a lot of things about this setup but there's too much friction when adding new posts.

    Published on November 22, 2014

  8. OnePad Finally Updated

    OnePad 1.4 is mostly me playing catch-up. The UI has been iOS 7-ified, it has 50% less capitol letters in the name and 100% less skeuomorphism in the icon. I did have a chance to add a few new features though.

    Published on November 21, 2014

  9. Two Great Programming Videos

    I want to share a couple of exceptional software programming talks that I've watched recently. They are both engaging, and if you're anything like me, will likely challenge many of your assumptions while enforcing other suspicions about the "right" way to write software.

    Published on October 04, 2014

  10. Get Your Free Build Numbers Here

    You'd think something as simple as an automatically incrementing build number would be a solved problem by now. Instead it seems to be one of those areas where everyone has their own workaround. At least for those of us not blessed, or cursed, with a monolithic shared build system. For Cocoa apps the build number is also known as a CFBundleVersion and it's a very useful thing for lining up bug reports with exact points in your code history.

    Published on September 23, 2014