Ben Scheirman

These fickle bits...



Leaving full-time employment means a lot more is on your plate. In addition to the actual work, you have to market yourself, find clients, and deal with the books.

Once you’ve found a client and want to start work you’ll have to sign a contract.

Contracts can be messy. They are written in a language that is intentionally difficult to understand. They also aim to explicitly cover extreme scenarios that are depressing to actually consider.

Moving On

I joined ChaiOne in February 2010, after having recently released my first iOS app (Pocket Tabs), and I distinctly remember telling my wife that I could see myself doing this full time. Doing so would mean leaving the world of .NET development where I was already successful.

Announcing Side Mirror for OS X

I’m proud to announce Side Mirror, an app for presenters who do live demos.


Side Mirror shows you a preview of what’s on your connected displays (like a projector).

Why is this useful?

  • You can keep your notes on your main screen
  • Refer to code snippets / copy & paste to demo
  • You can click through the preview window to the same position on the monitor, to avoid awkward mousing
  • You can stop craning your neck when doing live demos!

Side Mirror is available on the Mac App Store for just $9.99.

Runtime Size Class Changes in iOS 8

It’s been interesting to watch as Apple transitions from hard-coded device sizes, where you only have two real devices to think about (iPhone and iPad), to a more flexible approach that deals with devices of any size.

The hinting of a new potential screen size was so thick you cut it with a knife during WWDC. The engineers were practically winking at the audience. When they first announced that you could resize the simulator to “any arbitrary size” there was quite a bit of laughter, because it’s obvious that a larger iPhone is coming.

Many of the new APIs that we see in iOS 8 boil down to one thing: Getting rid of UI_USER_INTERFACE_IDIOM. (side note: can you imagine being an engineer in the room when the requirement came in and trying to estimate the ramifications? What a huge change.)

This means that there needed to be a way for UIPopoverController and UISplitViewController to work on iPhone, and allow a single Storyboards to address multiple screen sizes.

But the new APIs don’t just support a single code base & interface layout to work on iPhone & iPad, they also allow the screen size to change at runtime.

While watching WWDC Session 228, “A Look Inside Presentation Controllers” there are a couple of demos that show off changing the simulator size class & dimensions while the app is running.

Why is this significant? This hints at a larger change in iOS 8 where you’ll be able to do this as a user, being able to display multiple apps on the screen at once.

Indeed there seems to be code in Springboard on iOS 8 that points to this feature.Steve Troughton-Smith noted this a couple weeks ago:

We are in an interesting time, watching the tea leaves to see where Apple is headed. As an engineer it’s very exciting to see how Apple changes their frameworks to support new directions on iOS.

Ruby Style Iteration in Swift

It’s no secret I’m a fan of Ruby. Idiomatic Ruby iteration looks like this:

5.times do |i|
  puts "Iteration ##{i+1}"

This outputs:

Iteration #1
Iteration #2
Iteration #3
Iteration #4
Iteration #5

You can also iterate over collections in this way:

["apples", "bananas", "cherries"].each do |item|
  puts "Eating #{item}"

Regex in Swift

I’ve been playing around with Swift and one thing that struck me as odd/disappointing is the lack of regular expression literals.

First off, the language is new and yes I’ve filed a radar (rdar://17257306 for Apple folks). Please dupe it if you care about this.

What I mean by regular expression literals is this (Ruby code):

if name =~ /ski$/
  puts "#{name} is probably polish"

Fixing GitHub SSL Issue on 10.9.2

By now you’ve most likely heard about the egregious SSL flaw that has existed in OSX and iOS for a while now.

Yesterday, Apple (finally) released 10.9.2 which addressed the flaw, as well as some other features. Upon upgrading, I was more than slightly frightened to see this error when trying to open

Using Rbenv in Cron Jobs

When using rbenv on your server, you need to make sure that any gem command run needs to be executed with rbenv initialized. When you install rbenv locally or on the server, you typically have something like this added to your .bashrc:

if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi