On learning Ruby Motion versus Objective C & Xcode

When in Rome, speak Latin.

As the keen eyed amongst you have noticed, I released a few iPhone apps recently. As the even keener eyed will have noticed, I’ve switched from Ruby Motion to using the standard Apple developer environment; that is to say, Objective C, Interface Builder & Xcode.

So why the change? Whilst I still believe that Ruby Motion affords a much friendlier intro to writing iOS & OSX apps for web developers, there’s a few reasons why I’ve gone completely “native”.

Speaking a foreign language

Ruby is very easy on the eye, and Objective C is not. In fact, the verbosity and somewhat impenetrability (to a beginner) of Objective C is, I’m sure, mostly to blame for tools like Ruby Motion existing in the first place.

Thing is, like it or loathe it 99% of all example code, StackOverflow answers and useful extensions are written in Objective C. So you often find yourself not only in the position of trying to figure out whythefuckshitisn’tworking but also then attempting to manically translate a helpful answer into Ruby syntax. This did my head in.

Xcode is superb

The last couple of versions of Xcode have seen it go from a buggy, bloated piece of software that was panned by developers almost universally to a stable, productive environment with countless features that make writing apps easier. I love SublimeText, but the advantages that static compilation afford when it comes to writing code massively outweigh the 6 seconds or so I have to wait to build my app each time.

On top of all this, you get Interface Builder, one of my new favourite pieces of software. Using storyboards in Interface Builder make it easy to scope out the flow of your app without writing any code. Your interface and code are completely separated making reuse much more natural.

Storyboarding my latest app, Mobile DN.

Just… because

Really, the most honest reason I wanted to learn Objective C was just because I didn’t know it.

The learning curve for me was steep; I learnt C++ at university but haven’t used it since. But after hours of experimenting with header files, synthesizers, IBOutlets and square brackets, it all just came together.

Having knowledge of the way things work in iOS land from doing Ruby Motion helped immensely when switching to Objective C and also being able to try things out in a language you already understand is invaluable. All in all, I came to iOS development in a very round about way, but it seems to suit my learning style.

Fancy learning iOS dev? Here’s my favourite bookmarks…

  • NSHipster — In-depth articles on specific APIs
  • CocoaControls — Custom controls for iOS & OSX written by the community
  • iOS Dev Weekly — A weekly newsletter roundup of articles, controls and blog posts
  • CocoaPods — Like gems for Ruby, but pods for Cocoa
  • Programming iOS7 — A massive repo of example code, documenting common programming problems & solutions
  • Meng To’s Blogs — A series of excellent posts, introducing Xcode for Designers
Like what you read? Give Alasdair Monk a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.