Two reasons: one subjective, one objective.


Some people just don't like GUIs, and count me in! This has everything to do with preference and joy. I LIKE writing code, I don't like drag and dropping. So this isn't an argument, it's a fact: I, Colin T.A. Gray, like to type, and I don't like to click. I like to test my code, even UI code.

I understand that styling a label or button is faster when you can see it visually and change in real time, but in RubyMotion we have the REPL and that accomplishes the same thing, except it's running in the simulator, so if anything it's MORE reliable.

I don't want to spend much time on this, because it's just, like, my opinion, man.


Let the flame war begin! :-D Hopefully not. If you're pro-Xcode, good on ya, but consider this scenario:

A developer new to iOS, just bought their first Mac, but they know what they're doing because they, uh, they wrote OpenStep code for years. So they're ready to delve into iOS. Oh, and now they learned Swift. So yeah, good to go.

How long will it take for them to learn Xcode? They can browse files and edit code on day one (they won't like it, because they prefer vim, but oh well), but there is a huge, deep well of knowledge that they need to tap into:

  • Debugger. Sorry, your gdb/lldb skills count for little here.
  • Instruments. Easy to get started, but the options are quickly overwhelming.
  • Interface Builder. Again, easy to get started, but storyboards are intimidating. Are you doing things wrong if you don't use them?
  • AutoLayout. Yeah. I'm talking about the GUI for them, which is useful and voodoo magic at the same time. When something goes wrong, it goes WAY wrong.

So, yes, lot's to learn. Just like any other... programming language? Learning to write a server in go, or a webapp in Rails certainly didn't feel like this...

OK, well, now let's say they want to ask teh internetz:

How do I create a UITabBarController?

What does teh internet say? I'm pretty sure a description of drag+dropping, or hopefully some useful screenshots, are "the Xcode way". Now we're getting to my argument:

Knowledge of Xcode isn't transferable

What I mean is: those of you who are fortunate enough to have a thorough understanding of Xcode (especially those who still remember Application Builder!) have a HUGE leg up on those that DON'T. And getting people caught up isn't as straightforward as sending them a code snippet like this:

controller1 = UIViewController.alloc.init
controller1.title = 'Neato!'
controller2 = UIViewController.alloc.init
controller2.title = 'Completo!'
controllers = [controller1, controller2]
tab_bar_controller = UITabBarController.alloc.init
# use this to animate the change:
# tab_bar_controller.setViewControllers(controllers, animated: true)
tab_bar_controller.viewControllers = controllers

BAM, now our developer knows how to make a tab bar controller. And if they forget? No problem, they can pull up an old project and read the friggin' code (RTFC?).

I think this is a profound difference. Code can be taught and shared. Xcode has to be experienced. It's why Obj-C, and soon Swift, books are chock full of screenshot after screenshot of using Xcode. Learning this way was painful for me!

I compare learning Xcode to learning Adobe Photoshop. Yes, it's useful at first, and if you use it for a year you'll know a LOT, but it'll take a LONG time for you to know all the tricks. I think that doing things in code means that we can transfer knowledge and keep a record of HOW we accomplished some amazing UI or controller transition.

But the best reason

And here's something that I learned from Austin Seraphin, a prolific blind developer in the RubyMotion community: Xcode is unusable for the blind. If you disagree with me on every other point I'm trying to make, at least consider Austin's feeling when RubyMotion enabled him to write iOS applications, which he had never been able to do before! Listen to his presentation at #inspect2013 and #inspect2014 (not yet available), they are truly moving.

In closing

Use what feels right to you. Absolutely. As programmers we are in a unique and extremely fortunate position that, for the most part, we get great joy out of doing our very profitable profession. We should all do what we can to get the most joy from it!

But don't bash the Xcode haters, we have our reasons. :-)