RubyMotion Rocks!
Ever since I started using an iPhone, I have wanted to learn how to write apps for it. I made several attempts to learn Objective C, but it never worked out. Then one day I learned about RubyMotion and it changed my life forever, just like the iPhone itself. I have just finished the tutorial and have a basic understanding of how to write an app. RubyMotion rocks!
After Steve Jobs left Apple, he formed a far out computer company called NeXT. They developed what they hoped would become the next amazing computer, especially in educational institutions. They wrote a custom operating system called NeXTSTeP. They created a new programming language for it called Objective C. It combined the standard features of C with a unique object oriented syntax, including keyword arguments.
When Apple bought NeXT and hired Steve back, they decided to use NeXTSTeP and Objective C. This became the core of what we now know as Mac OS. It then found its way into iOS. To this day, many objects start with NS, such as NSString and NSURL. The NS, of course, stands for NeXTSTeP. Seeing NS always reminds me of the whole story, and how one never knows how their accomplishments and actions will influence the future. NeXT failed, but their work succeeded.
Since I wanted to write apps, I had to learn Objective C, or so I thought. As I have written previously, I’ve never had good experiences with C. It reminds me of a bad relationship – you try to make it work, but it just doesn’t.
I began to assume I could never write apps, but remained hopeful.
One day, I read an article on Cult of Mac about a hot new iOS programming course called Tinkerlearn. It attracted my attention because it has the lessons within comments in the source code. Programming languages include a way to leave comments which the language ignores. This lets us mortal humans document our code. Embedding lessons in comments seemed very creative, not to mention highly accessible. It cost $14.99 so I figured why not? I bought it and fired up XCode, Apple’s development environment, the program you use to write apps.
In the past I have joked about a correlation between programming in C and drinking beer. This applies to all dialects of C. In the case of Objective C, forget the language, I felt like I needed to drink a beer just to use XCode. I don’t know how it looks to sighted people, but to me it seemed like a very complicated program to do a very complicated task, with lots of very complicated controls and strange areas of the screen to do all sorts of esoteric things, when I just wanted to write and compile a program. And this from an Emacs user! Nevertheless I trudged on, and started to get into the course.
I emailed Parker, the author, and we struck up a dialog. I told him of my hope to write apps, and the challenges of a blind developer. Specifically I wanted to know about designing interfaces programatically. Sighted people use something in XCode called Storyboards to visually lay out the screens of the app, then they add hooks to these elements. VoiceOver could read none of it, so I actually have to create the interfaces with raw code. Some sighted people also prefer this, and Parker actually released a modified version of one of his lessons specifically to teach this. I felt overjoyed, but confused.
After I wrote an article about how much I loved Ruby, Parker wrote me back on Twitter, agreeing with me. I wished aloud that I could write apps in Ruby, fully knowing of Apple’s restrictions. Parker wrote back and asked if I had ever heard of RubyMotion. It lets you write iOS apps in Ruby! Really? And it uses standard terminal utilities! Really? And you can use your favorite text editor. Really? I emailed Laurent Sansonetti,, the author of the program, and he said if it didn’t work he’d refund the $200 price. I figured I’d spend that on headache medicine if I continued learning Objective C, so took the plunge.
Have you ever visualized something, but just figured it would forever exist in your imagination, only to one day find out that it really does exist? You get a very weird feeling actually seeing it on the physical plain. I felt exactly like that when I first got RubyMotion working. It felt like the spirit made flesh, like a dream made real, and like the way I could finally write apps. Welcome to the future!
I just finished the tutorial by Clay Allsopp. The entire RubyMotion community feels exhilarating, and has given the utmost help in my unique situation. I can’t say I can write an app, but I actually understand the basics. Most importantly, I understand the way different subviews combine in a main view to make what you see on your iPhone when you run the app. I still have a lot to learn, but for the first time the pieces have started sliding into place!
One day you will see my apps in the app store. I have lots of ideas to change the world and make people laugh! RubyMotion makes it all possible. I’ll take Ruby and Emacs over Objective C and XCode any day! Dreams really do come true.