I Love Xcode

by Ed on October 4, 2009

A while back I wrote a post called “I hate Xcode”. These days I feel I need to post a revised statement based on my more recent experience with Xcode which can be summed up with: I Love Xcode. I guess this is much akin to Leonard Nimoy writing “I am not Spock” and later writing “I am Spock”. When I wrote the original post, I really did want to throw Xcode off of a bridge. And Visual Studio did seem better to me. It was more stable and faster. But in the last few releases, Xcode has really stepped up its game, particularly in 3.2, and meanwhile, VS has gotten worse and slower. Thank Osiris that I never have to use VS again.

I think the true turning point started at around Xcode 3.0. Xcode is now quite simply the best IDE I’ve ever used. Most all of my complaints have been solved over time, and admittedly I’ve figured out a few things along the way that made me finally get how it all works. I thought I’d point out a few of the things that made me realize that Xcode rocks. If you’re an Xcode aficionado, I’m sure you’ll already know these.

Fast Compilations

It’s just simply super fast to compile. On my last project, I was able to clean in about 5 minutes on an iMac. In Visual Studio on my quad-core PC it took like 20 minutes clean or not. Granted it has more files to build, but wow. Slow. To the point that any time you realized you’d have to build Windows and you weren’t at top-of-tree you were like “there goes a half hour”. These days, doing iPhone apps, my app at work takes about 20 seconds to clean build. And more like about 2 second to build/link and fire up the simulator for a quick change.

Settings That Are Useful

Setting project settings used to frustrate me on Xcode. You have project settings, and then you have target settings, and it just seemed like too much. I’ve finally gotten to get the how and the why around this and I understand it all now. Recently though I had to mess with settings, and I think if it weren’t for two features, I’d still be trying to find and set the settings correctly:

  • ability to filter settings. Type ‘install’ in the search box and get all settings having to do with install paths, etc. Avoids having to scan a big giant list of options.
  • the fact that Xcode actually shows you the computed paths. If you click something it might be generated from variables, etc. but once it’s commited you see the path it’s going to use. I can’t begin to tell me how much time that saved me the other day when I was wondering why something wasn’t working. This was always a source of frustration in Visual Studio for me.

They might not seem like OMG features on the surface, but the time it saved makes me say OMG anyway.

Code Completion

The code completion feature of Xcode used to be frustrating to use, but in recent releases it works extremely well. It’s smart completion combined with text macros completing code fragments like if statements, etc. makes it damn quick to write code. And furthermore, you can adjust the templates of the generated code to match your code style either by creating your own text macros or by setting some defaults on the command line by setting the XCCodeSenseFormattingOptions property. For example, I like open braces of a block to always be on the next line. It help readability for me and it also helps editing a bit. Just setting a few options using that default and you can get the Xcode text completion to do your bidding.

Syntax-Aware Editing

I love the syntax-aware editing, particularly with cut and paste. Often times I’ll even cut and paste a section of code just to make it fix it up (maybe there’s another way but I’m too lazy to find out). As mentioned above, you can tweak some defaults if the code style doesn’t please you. But it’s nice to type a ‘}’ and have it put it where it belongs. Or split a call to an objective-c method across multiple lines and have it line everything up for you at the colons. One other thing that I like is when you perhaps take a method and add another call to it. For example, let’s say you typed: [foo retain] and now you want to add autorelease. Just follow it up with autorelease] and Xcode will put the starting [ in the right place. It doesn’t always get it right, but in most cases it does. Very nice, as it is certainly a bit annoying to otherwise have to go back to the start yourself just to add a starting [, which has always been one of my nits about obj-c syntax. I like it when the tools make my nits a non-issue.

Refactoring Tools

The refactoring tools that Xcode provides are really nice. The current transformations that are supported are definitely helpful at times, and I hope they continue to think of more goodness they can add here.

Slipstream Drive

With all the above features — in general lots of ‘little things’ that make things just work — Xcode allows me to write code incredibly fast. I feel like code just flows out of my fingers and the IDE just knows what to do with it. Occasionally though, I’ll long for a couple of smaller niceties from Visual Studio, or perhaps the code completion isn’t quite doing what I want, and it kind of knocks me out of slipstream drive. I’ve recently filed a couple of enhancement requests for them. We’ll see what comes of them, but if they did manage to get them in, I would truly have an all-powerful programming tool at my fingertips.

I’m sure there’s more things (data modeling, etc.) but I haven’t used all those features. My bliss these days comes from just being able to sit down and get incredible amounts of work done in a relatively small amount of time. To me, that’s what makes Xcode so amazing and pleasurable to use.

Bet you didn’t expect to hear me ever say that, now did you? :-)

{ 1 comment… read it below or add one }

Rob October 5, 2009 at 10:04 am

I think there’s something in the water. You should start bringing bottles of tap from outside.

Reply

Leave a Comment

Previous post:

Next post: