isKindOfClass and XCTest

I learned something very useful today.  My group uses Apple’s XCTest as a framework for test automation.  Because of the way XCTest gets associated with the app, there are certain rules you need to follow that aren’t completely obvious in order to use certain very common features of CocoaTouch. How XCTest Can Test Your App […]

Continue Reading...

Download data from mint.com

I’ve been using mint.com for managing my finances since 2009.  It’s a terrific website for budgeting and visualizing how you spent your money.  I recently joined Tableau Software and wanted to employ the power of Tableau against my data.  The first step to doing this is to download my data into a file that Tableau […]

Continue Reading...

Git fix guide

I consider myself a fairly advanced user of Git.  I’ve been using it for most of the past 5 years and really enjoy the workflow improvements, and in the circles I run I am typically consulted when folks have a question about Git.  Of course, I couldn’t be nearly as effective without the help of others […]

Continue Reading...

Double-Checked Locking and Objective-C

A common problem in software is to do something exactly once – e.g. create a singleton.  A corollary of that action is to do something exactly once in the life of an instance.  I have found myself using the corollary much more frequently as I move away from using singletons, which I’ve done to improve […]

Continue Reading...

Rolling a Ruby gem back to a previous version

I ran into a problem with the Ruby gem for a tool I use recently when I installed the latest version and then found it was broken.  I wanted to roll back to the previous version, which turns out to be extremely simple.  Here is the command I used and the responses I received: I […]

Continue Reading...

CocoaConf 2013 in San Jose

Last weekend I attended CocoaConf in San Jose.  CocoaConf is a technical conference for developers working iOS or Mac OS X.  Workshops and sessions are taught by form Apple developers and important developers in the industry, many of whom have written books.  It was a great conference, both for the content and for the opportunity […]

Continue Reading...

Mac App: Ejector

Does this ever happen to you?  You download a DMG file to install an application, mount it, then install the app.  At that point you go on your way and forget about the mounted image.  Or how about you have connected an external drive or a flash drive and you can’t get to your desktop […]

Continue Reading...

Sorting Objective C Import Directives

I know I’m a bit obsessive compulsive, but I’m rather fastidious about how I organize #import statements in alphabetical order at the top of my Objective C files.  If I’m creating and maintaining the file myself, it’s not so bad, but when I work on an existing file it’s a lot more work.  Wouldn’t it […]

Continue Reading...

Hidden Menu Bar Apps

If you’ve used OS X for any length of time, at some point you’ll probably find yourself in the situation where you can’t get to the icon for an app on the menu bar, particularly if you are using a machine with a small screen (MacBook Air or Pro 13) or you use a projector […]

Continue Reading...

ARC weak references on iOS 4

I’m finally exploring ARC (Automatic Reference Counting) for development on iOS 4 and above.  Mike Ash provides a terrific introduction to ARC along with some pitfalls. One of the pitfalls of using ARC is that weak references (aka zeroing weak references) are not supported on iOS 4 or on Snow Leopard.  You could use Mike’s […]

Continue Reading...