Live data from Hacker News

Ask HN: Experienced programmer, beginner to iOS (objective-C). Where to begin?

news.ycombinator.com

11–20 of 37 posts

Re: Ask HN: Experienced programmer, beginner to iOS (objective-C). Where to begin?

#11
I was two years out of school working on C# and WPF when I was tasked with writing an iOS app. My first steps to gain knowledge of the syntax/structure/etc of the language was to watch the Standford CS139p lectures (http://itunes.apple.com/itunes-u/ipad-iphone-application-dev...). I only had to watch the first six or so before I had a good knowledge of the language and the starting point of UIKit. From that point I just started brute forcing it.

Reading Apple's documentation was the fastest way for me to ramp up and they actually include a lot of really useful examples. Even lower level things like CoreGraphics have some in depth examples which will probably be what you need for your "Flipboard" like interactions.

Because I do so much iOS dev I have my own "library" I now use for every project. But it was cobbled together over a couple years and inspiration was taken from many open source projects.

I probably learned the most from Jeff Verkoeyen's GitHub projects, his Nimbus framework being one of the best https://github.com/jverkoey/nimbus

If you need to make web requests in your app (which basically every app should) ASIHTTPRequest is an interesting framework. https://github.com/pokeb/asi-http-request. I took the idea behind this and distilled it down to something that was much simpler which is what I needed. ASIHTTPRequest is sorta the kitchen sink of web request clients.

If you need a relational database in your app, sqlite is a simple include away. There are a lot of wrapper frameworks out there but I didn't use any of them. I wrote my first app directly accessing the C API and then wrote my own wrapper framework for it. Because I had never used SQLite before needed it in iOS it helped me learn a lot more about it.

If you need to store username/password/token/etc for the love of god don't make the novice mistake of saving to NSUserDefaults. Save to the Keychain https://github.com/reidmain/FDKeychain

One thing I'd point you to is my collection of Categories and Macros that I put into every project https://github.com/reidmain/Objective-C-Categories-and-Macro.... Specifically pay attention to FDIsNullOrEmpty, NSObject+PerformBlock, UIView+Layout. I use these categories so much that I always include them in my precompiled header file.

Re: Ask HN: Experienced programmer, beginner to iOS (objective-C). Where to begin?

#12

I'd say there's no quick way to do it, the message passing of obj-c is very different than the event-based slots & signals programming you are used to. And that's before the hell-which-is-InterfaceBuilder. Since you already familiar with programming, I'd suggest the Big Nerd Ranch guides at bignerdranch.com Most online examples won't give you the details about the important stuff - single inheritance vs. categories,…

I second the recommendation of the Big Nerd Ranch guides. They are excellent for learning Objective-C and IOS.

I've been playing around with Ruby Motion for the past two days and since I am pretty experienced with Ruby already, I'm finding it helpful for learning ios concepts. However, if you don't have any experience with Ruby I would recommend just starting with Objective-C and xcode.

Re: Ask HN: Experienced programmer, beginner to iOS (objective-C). Where to begin?

#13

Earlier quoted context omitted.

Yes, the general opinion seems to be: Use Objective-C with the new Automatic Reference counting mechanism. iOS libraries - in your opinion - what are some good resources to get familiar? (Google-fu results in a lot of links to wade through).

I can not agree with recommending ARC to anyone at this time; in this case there is a ton of existing code out there which is incompatible with it. If you are an experienced obj-c developer who's tired of writing boilerplate and uses the static analyzer with LLVM - then go for it. Learning to clean up after yourself is a life skill worth having. And besides, there's always the -fobjc-arc flag for classes which use it…

If you need to include those files in your project, you can just turn ARC off for them while leaving it on for the rest.

Re: Ask HN: Experienced programmer, beginner to iOS (objective-C). Where to begin?

#14

Earlier quoted context omitted.

Yes, the general opinion seems to be: Use Objective-C with the new Automatic Reference counting mechanism. iOS libraries - in your opinion - what are some good resources to get familiar? (Google-fu results in a lot of links to wade through).

I can not agree with recommending ARC to anyone at this time; in this case there is a ton of existing code out there which is incompatible with it. If you are an experienced obj-c developer who's tired of writing boilerplate and uses the static analyzer with LLVM - then go for it. Learning to clean up after yourself is a life skill worth having. And besides, there's always the -fobjc-arc flag for classes which use it…

You can disable ARC for some or all part of your program, so lib compatibility is not a problem.

Re: Ask HN: Experienced programmer, beginner to iOS (objective-C). Where to begin?

#15

I was two years out of school working on C# and WPF when I was tasked with writing an iOS app. My first steps to gain knowledge of the syntax/structure/etc of the language was to watch the Standford CS139p lectures ( http://itunes.apple.com/itunes-u/ipad-iphone-application-dev... ). I only had to watch the first six or so before I had a good knowledge of the language and the starting point of UIKit. From that point I…

That's all good advice, but I'd like to point out that ASIHTTPRequest has been abandoned for about a year now. I think most people have switched to using AFNetworking (https://github.com/AFNetworking/AFNetworking) which came out of Gowalla.

As a nice bonus, AFNetworking doesn't require you to implement delegates but instead allows you to use blocks, which simplifies things somewhat.

Re: Ask HN: Experienced programmer, beginner to iOS (objective-C). Where to begin?

#16
Start with the Stanford course. It's the best free resource out there. Find a local meetup. Go to a couple hackathons.

re: other comments -

Apple's docs aren't great, in fact I hate them. Haven't put my finger on why.

I like some of the controls at http://cocoacontrols.com

I wouldn't start with Arc. Especially since you're comfortable in C.

Re: Ask HN: Experienced programmer, beginner to iOS (objective-C). Where to begin?

#19

I was two years out of school working on C# and WPF when I was tasked with writing an iOS app. My first steps to gain knowledge of the syntax/structure/etc of the language was to watch the Standford CS139p lectures ( http://itunes.apple.com/itunes-u/ipad-iphone-application-dev... ). I only had to watch the first six or so before I had a good knowledge of the language and the starting point of UIKit. From that point I…

Thanks a lot for the detailed reply. Much appreciated.

Re: Ask HN: Experienced programmer, beginner to iOS (objective-C). Where to begin?

#20
post #17

I keep getting stopped up at the first step: Buy an Apple Computer. If I can ever build IOS apps on Linux, I may move on to step two.

Can anyone specify the absolute minimum requirements I should be asking for if I'm looking for a dev Mac on craigslist or the like?

As a (mostly) web developer there's a good chance I'd build most of my app in HTML/CSS using something like PhoneGap and only do the final compile step on the Mac. A) Does that sound like a good plan? B) Does that impact significantly on the minimum system requirements?

Post reply on HN