Hacker News new | ask | show | jobs
by mpk 5379 days ago
I recently started coding Obj-C in XCode and was very surprised that it's far less polished than what you expect from an Apple experience. That is mostly because an Apple experience is consumer-facing and much more time goes into making that a better experience.

XCode feels like a GUI for GCC, which it is. It's a whole pile of flags that you can set, tweak, etc. If you don't have some GCC experience, this is a bit of a hurdle. Project settings sometimes break (especially around code-signing), so keep your text editor handy. When things break the error messages can be cryptic and there's usually no 'double-click to get to the error in the IDE'. Obj-C is obviously C, but it's also obviously not and also not syntactically similar to, say, C# or Java (or Ruby, JavaScript, Python, etc). I found the step to Obj-C to be fairly trivial, but I thank time spent with C, GCC and Makefiles for that.

After this it's mostly the same as anything else - which is diving into massive amounts of APIs and best-practices.

iphoneos-simulator is brilliant. Much, much better to work with than Android simulators (mostly because of the insanely faster startup time and the ability to change hardware on the fly). Another brilliant piece to find was Instruments, which is an Apple GUI for DTrace. Profiling and tracing execution on simulators and devices is a breeze.

I think memory management is a bit of a non-issue and I'm surprised that's even being brought up. That many programmers only know one language / IDE and judge everything else as inferior/bad/etc is a reasonable observation (if not a totally obvious one), but that's not going to change anytime soon.

TL;DR

    - XCode has warts
    - Obj-C is different than Java/C#
    - Errors can be a pain
    - iphoneos-simulator is brilliant
    - Instruments is fantastic
    - Easy to pick up if you're familiar with GCC
1 comments

In response to your TL;DR :)

    - XCode has warts: Yes, it does. Still, it is phenomenally better than other environments for efficiency now and is truly a joy to use. And we have few, if any, crashes.
    - Obj-C is different than Java/C#: If you're familiar with one language, I can understand disliking that. I went from Java -> C# -> PHP -> Ruby -> Objective-C. That is quite a change! But still, I absolutely love Objective-C. It has everything I could ask for, including my favorite syntax ever created. Nothing is ambiguous to me and our team is able to crank from concept to MVP faster than any other platform by far. Better yet, the speed we can squeeze out of our code blows all other platforms away.
    - Errors can be a pain: they can be. We ended up setting a standard syntax for logging actions so we could quickly drill down to errors. Wish it was easier and they can definitely improve here.
    - iphoneos-simulator is brilliant: completely agreed.
    - Instruments is fantastic: damn skippy.
    - Easy to pick up if you're familiar with GCC: true.
I disagree with your first point. The editing features like finding files, key bindings, navigating methods within a class etc. are pretty clunky.If they gave us a vim plugin I would be happy.
Ah, ok. We both have a fundamental difference in terms of code editing preferences then. I hate vim with a passion, but that is also because I'm a very visual user. To each their own and what works best then :)