Ask HN: Getting into OS X/iOS development as a Rubyist: learn macruby first?
I want to get into OS X/iOS development. I'm a rubyist.
Learning MacRuby would be easier for me, but I think I would inevitably transition to Objective-C as I reach its limitations (maybe some advanced stuff, libs, and iOS development).
But, Objective-C/Cocoa from scratch would be much harder for me to get into.
Is there any benefit in learning MacRuby first as a way of conditioning my brain into how Apple development works, or should I dive straight into Objective-C/Cocoa?
This is the learning path I have envisioned:
- Learn MacRuby (books, screencasts, ...) - Learn Objective-C - Learn Cocoa - Learn Cocoa Touch
Is MacRuby a good stepping stone or should I skip it?
13 comments
[ 0.32 ms ] story [ 43.6 ms ] threadWhat do you think?
Unfortunately, it doesn't really make the learning curve any less intense. While Objective-C's syntax and style are somewhat difficult, the real challenge to Mac/iOS programming is having a working knowledge of the Cocoa API. MacRuby simply acts as a bridge between Ruby and Cocoa, meaning you need to know exactly the same amount about API methods no matter the programming language you choose.
Reading the currently available MacRuby book is a great idea - http://ofps.oreilly.com/titles/9781449380373/. If you find yourself confused by the concepts, you should try learning Objective-C and Cocoa first (I learned with http://www.amazon.com/Cocoa-Programming-Mac-OS-3rd/dp/032150...). It is certainly possible to dive in with MacRuby! Just remember that it's not 1.0 yet, and could present technical difficulties in unexpected ways. Otherwise, it's super fun!
All things considered, it seems like MacRuby might make it's way onto iOS in the future (http://iflipbits.com/post/1101983568/macruby-soon-on-ios, although that's 8 months old, so I'm not really counting on it for now).
Yes, I figured that out after researching enough about obj-c, cocoa, and macruby. That's why I wondered if learning MacRuby first would ease me into the process by taking away a layer of difficulty (obj-c). Then after I get the hang of it, I could transition to objective-c, maybe through one of PeepCode's screencasts, "Objective-C for Rubyists".
As a Rubyist, there's definitely some differences (named parameters, for instance), but you get the hang of it pretty quick. As a Cocoa developer, debugging with MacRuby has issues, as Xcode doesn't always know about the right symbols since it's not compiled (but this is getting better!).
Use the MacRuby book, and learn to love Xcode's documentation, and you should be good to go. If you do have issues, email the macruby-devel mailing list or visit #macruby - the community is super friendly and happy to help!
re iOS: I'm really hoping. With MacRuby shipping by default with Lion, iOS 5 will hopefully follow suit this summer.
It's a little hard to get past Objective-C's syntax at first but after it all begins to click it's not so bad. I think learning the Cocoa API would prove the more difficult step in your learning path.
As others have mentioned, there is no MacRuby for iOS, and the MacRuby for Mac OS X is fantastic, but a lot less capable than Objective C, still.
No slam to MacRuby though, as I suspect they'll be a tier 1 Mac development platform in the next 5 years.