Ernie Ball Cobalt Strings
The Music Industry Wants Me to Steal
So here’s a real life scenario I came across last night…
Many years ago, when I was a wee little lad, I owned pretty much every Black Sabbath album. Loved ‘em, rocked out, good times ‘n such. The headbanging came to a screeching halt my freshman year when someone broke into my dorm room and stole every single CD I owned – a few hundred. Long story short: I was more into punk at the time and over the years, as I repurchased parts of my collection, the metal albums got neglected.
Now, let’s fast forward to last night. I decide it’s finally time to own Paranoid and Black Sabbath (1970) again. I check Amazon MP3… no love. Off to iTunes. Again, no love.
Some dipshit(s) decided that digital sales of the first 2 Black Sabbath is a no go. I was (still am) ready and willing to pay the standard $9.99 for each of those albums – but I can’t.
Next best option? I can order the physical CD’s from Amazon – they’re both less than $9. Let’s pretend for 1 second that I would actually buy a physical CD in 2012. Now these dumbasses are losing $. I’m used to digital albums being $9.99 – so they’re out at least $1 just off the price tag… not to mention the cost of shipping, plastic and all the other production costs of the good.
“Just buy the CD and rip it yourself!”. No dice bitch! Why? Because my only computer is a MacBook Air and I don’t have a fucking optical drive. I could buy the CD, go to my buddy’s Ryan’s house, have him rip the CD then send me the music I just paid for. But… now Ryan essentially has a pirated version of the album sitting on his hard drive.
So, ya. This is definitely a super specific scenario but its a 100% true story. It serves as a good example of how retarded and stuck these music industry people are.
Orchestra Recording Theme To Zelda
XCode vs JetBrains AppCode – Objective C IDE Comparison
OK – I wanna outline the background here first…
I am not an OSX or an iOS developer. It’s Thanksgiving weekend and I figured the easiest way to learn some Cocoa development would be to come up with a simple OSX app and try to get it done by the time Dexter airs Sunday evening. The app I want to build is pretty simple and I figure I’ll be able to get pull it off; if not, at least I’ll be learning a bunch of stuff in the process.
The obvious thing to do is read a few things on Stackoverflow, Google a few tutorials, open up Xcode and have at it. Well, I don’t like Xcode… I’ve been using Intellij IDEA for about 10 years & in the last 3 years or so have tried just about every IDE available for Java, PHP & Python. In every case I’ve found myself happier using Jetbrains’ products.
Like any good programmer I’ve fucked around with writing iOS apps. I’ve bought a bunch of books, gone through writing all the example apps etc. I’m no pro but I’ve gone through the motions, never really got serious, but i’m not 100% ignorant to Apple’s SDKs and development environment(s). It’s been fun experimentation but all along I kept thinking to myself “heh, Xcode kind of sucks”. My iOS friends disagree and think it’s awesome.
Anyways – that’s how I got here – writing this blog entry. I wanna write an Mac app (not iOS), don’t like XCode, been using Jetbrains’ stuff for years & now they have have AppCode – an Objective-C IDE available.
Clearly I’m not 100% objective here right? I’ve settled into Jetbrains’ “ways” and come loaded with certain expectations. But, for what it’s worth, I’ve used Netbeans & Eclipse from time to time and, even though I prefer Jetbrains, I can make do with those IDEs: they have the features I want/need.
Let’s start there… what do I want from an IDE:
- easy code navigation: jump to a file, class, method, symbol, editor tab, last cursor position, go to implementation, go to definition, see quick docs etc. I want to hit some keystroke and get around my big ass project.
- code completion
- easy code generation to save time on the mundane bullshit.
- refactoring
There’s a ton of other stuff I want/need but those are the core features I’ve grown to love when I’m in “writing code” mode. Debugging, building projects etc are all awesome too but I’m gonna focus this entry on getting around a project & writing code.
Getting around a project
Right off the bat I hate Xcode’s default setting that opens a new editor window when you double click on a file in the Navigator. This is fucking annoying but you can change this behavior in your preferences. The closest option to what I feel is “normal” is the Double Click Navigation: Uses Separate Tab. Even so, weird shit happens when you’re in this mode.
It seems like XCode just isn’t optimized for multi-tab use…
- double clicking on the same file in 2 separate “interactions” leaves you with 2 separate tabs for the same file. Ex: double click on Balls.h, a tab opens for it, wait a couple seconds, double click on Balls.h again and now you’ve got 2 tabs for the same file. Why?
- when using Open Quickly dialog, the newly selected document will take over the currently active tab. Ex: close all editor tabs, open Balls.h, now trigger the Open Quickly, search for something in a different file & select it. The editor tab that had Balls.h in it will replace its contents/context with what you just selected. This is fucking annoying as hell.
- even jumping to the declaration/definition of a symbol reuses the current tab. You can get back and forth using the Back and Forward commands but, personally, I’d just rather have it open in a new tab.
This is all preference but, for me, tabbed navigation is what works. It’s like that in web browsers, its like that in TextMate etc… I’m used to it and I like it better that way.
Open Quickly is also kind of annoying: as far as I can tell its the only way to search throughout a project. It does a good job but it’s too broad: it searches every single symbol, including shit from frameworks etc. I prefer the 3 separate options I get with AppCode: goto: class, symbols or file. This allows me to essentially pre-filter. Showing me every fucking symbol is a bit much… I know if I’m looking for a file, method name or class – I’ll use a different keystroke to trim the fat. Plus, “find symbol” will show me everything Xcode’s Open Quickly can with a few extra: I can optionally include non-project results, filter file types and even get the results to show up in a persistent frame below; allowing me to go through a bunch of shit without repeatedly triggering the Open Quickly dialog.
There may be a better way to navigate in XCode – but I haven’t found it. Maybe that’s a whole different issue in and of itself. And, like I said above, I am biased by the “Jetbrains way”… I’ve been doing this for years but I sincerely believe it’s better, more flexible & gets me flowing through a big ass project rather efficiently.
Another subtle touch in AppCode is that it utilizes camel-casing to help minimize the # of keys I have to press. Here’s an example: In XCode use Open Quickly to search for AppDelegate.m. You have to type “AppD” before the file you want becomes the first result. In AppCode I can use the “goto class” keystroke, type in “AD” and voila, I’ve got what I want. Its a subtle thing but it minimizes the number or characters I have to type.
Same goes for wildcards. Open Quickly always does an “in” type of match wheres AppCode lets you use wildcards in your searches. Personally I prefer wildcards. Subtle… but in my opinion way more flexible and useful.
Code Completion
This one goes to AppCode as well. On the surface it’s a tossup, but really it’s no contest.
AppCode does a way better job at dealing with symbols that are not currently imported. Ex: Write a new class called Booya and try to alloc/init it, Booya *booya = [[Booya alloc]init];, in a method in some other class using both IDEs:
- Xcode just isn’t very helpful. Neither of the autocomplete triggers (ESC, or ^ space) show Booya as an option when you type “Boo<trigger_autocomplete_here>” unless you’ve already added the #import yourself.
- AppCode on the other hand will help with the auto-completion and also puts the #import at the top for you. It actually helps & takes care of the mundane bullshit.
- Contextually AppCode can even tell if you’re creating a new variable and through the auto-complete cycle it’ll suggest a name for the variable, add the * etc. XCode doesn’t seem to understand the symbol’s contextual use (aka: yo, Im instantiating a new instance and setting a local variable). This seems to be true even if you do the #import first.
Code Generation
By far the most annoying thing with XCode is the fact that it seems to provide zero code generation help. What do I mean by this?
- When I add some methods to a .h file, I have to copy/paste the signature over to the .m
- When i say a class adheres to some protocol I have to navigate to the protocol’s .h file, find what I want to implement and copy/paste the signature over to my .m.
- I have to type way to much to declare and synthesize a property/ivar
This is really, really fucking annoying & stupid. AppCode has keystrokes available to generate code that overrides methods, implements methods, @synthesize vars & even generate init & initWith methods/constructors.
Hands down AppCode takes the cake here. This boilerplate code is brainless shit… the IDE should just do it for you. I’m shocked XCode doesn’t have these types of features. I don’t think its my lack of familiarity with the tool either; others have asked online if this is possible and the answer, as far as I can tell, is “no”.
Refactoring
Rename, move, introduce local variable, create global variable, extract method etc… These are all things I expect a proper IDE to have. XCode does provide some of this, but not all.
Trying to extract a method in XCode takes forever as it analyzes the file. Furthermore after that shit’s done it loses some of the typing info. Let’s look at this code:
Booya *b = [[Booya alloc]init];
So we select the [[Booya alloc]init] part and try to extract a method. Here’s the problems:
- the default suggested name for the method is terrible, extracted_method. Thanks, now I have to type in a proper name myself
- the resulting signature becomes: - (id)extracted_method. Oh great, it “lost” the type info.
Let’s pretend we’re ok with those 2 things above. After the fact the “undo” goes 100% apeshit insane. I’m trying this now & flipping between undo/redo to see if i can make any sense of what XCode is trying to do here. All i can tell is that’s its gone crazy & somehow has fucked up its undo/redo stack.
AppCode doesn’t actually kick ass here…
- no method name is suggested… you have to manually type one which really sucks
- but it retains the return type of Booya
- doesn’t have the “analyzing file” lag
- the refactor dialog isn’t too efficient as far as click/type economy goes. its actually quite cumbersome
So, this one’s a tossup. They both fuck a few things up.
Introducing variables in a refactor works well in AppCode tho. Let’s take this code:
NSString *title = [sender title];
NSString *title2 = [sender title];
Selecting the bold stuff and doing Refactor->Introduce variable works fine. It will extract a new NSString and change the right had side of both title and title2 to use the newly introduced local. So, that’s nice
AppCode has other nice refactoring support like “convert to block” etc too.
You Need XCode
One thing about AppCode is that it needs XCode. Trying to open a .xib will actually dump you into XCode. This can be weird but it’s a fact of life – reimplementing Interface Builder is probably a terrible idea.
Some project settings changes have to be made in XCode as well.
I’ve also ran into situations where AppCode bitches about an ivar where XCode doesn’t. Even stranger, it’ll build the code and run the app even tho red squiggles are showing up in the editor. Here’s sample code that shows this:
@interface AppDelegate : NSObject {
NSTextField *label;
}
@property (assign) IBOutlet NSWindow *window;
@property IBOutlet NSTextField *label;
As far as I can tell this is related to stuff I just don’t understand regarding Objective C. Error actually reads:
ivar for assign property ‘label’ must be __unsafe_unretained
Trolling Stackoverflow shed some light but obviously I have a lot to learn here too. Either way, AppCode should decide whether this is an error or not. Why are there red errors in the code editor when the app compiles and runs just fine?
Conclusion
I like AppCode better. It’s not perfect but its very, very familiar to me. I’ve used Intellij, Pycharm & PHPStorm a lot and having an environment I’m used to and comfortable in is a big deal to me.
Aside from the familiarity, I think AppCode is more powerful and offers features that, if learned & used, are a more efficient way to get around your code & even auto-generate the boilerplate nonsense for you.
With all that said – I can see disadvantages to AppCode as well. It costs $. A personal license is only $70, so it’s not gonna break the bank… but, free is free. Another practical issue is that tons of iOS & Cocoa books and tutorials will show you how stuff is done in XCode. This introduces an extra hurdle for learning as you can’t always follow an exact recipe.
But anyways – I ditched Eclipse and the official Google provided tools when doing Android dev (opting to use IntelliJ) and that worked out just fine. So, I’m gonna take my 30 day free trial of AppCode and milk it for all it’s got. I’m pretty confident I’ll pick it over XCode.
Religion and Stuff
I don’t intend on introducing some vim vs emacs thing here. This is all about me… what I want, get, enjoy and dislike about the available choices in a dev environment. Maybe XCode does everything I want & I haven’t found the magic keystroke or menu item yet. Like I said – I’m a noob at Mac & iOS programming.
But, on the flip side, I’m pretty sure XCode lacks some of the features that I couldn’t find (implement method etc). If I’m not on crack and this really is the case I’d encourage you to try AppCode. If it enhances productivity for Objective C the same way it enhances productivity for Java then you really, really should give it a fair shake.
Search This Blog
Categories
- Banjo »
- Geek »
- Guitar & Bass »
- Life »
- Miscellaneous »
- Movies »
- Music »
- Startup Life »
- Video »
- Video Games »
- Work »

