Hacker News new | past | comments | ask | show | jobs | submit login
AppsAmuck: iPhone development examples (appsamuck.com)
79 points by podorozhny on July 18, 2010 | hide | past | favorite | 17 comments



I had looked at these tutorials initially when I started to develop for iPhone and found them to be lacking in depth.

Personally I found the code examples that shipped with xcode (especially iPhoneCoreDataRecipes http://developer.apple.com/iphone/library/samplecode/iPhoneC...) to be the most helpful when starting out.


I tried these several weeks ago and found that they're out of date -- is there an easy way to update these examples to get them to work with iOS 4? Or another set of examples already made for iOS 4?


...is there an easy way to update these examples to get them to work with iOS 4?

Apple probably doesn't ship the SDK it targets anymore. Double click on the project name under "Groups & Files" and change the "Base SDK" setting from whatever it is (probably 2.x-era) to the latest one that you have installed.

// edit: Yup, downloaded one project (WhatsMyIP) to look at and this was exactly the problem/fix. There were other warnings, but those are non-fatal. Or, at least, it still builds. I didn't actually run the app (my iOS device and sim are both busy with other tests right now).


These would be awesome on github. Please? :)


Especially with the community aspect, forking, improving, pushing back.

Maybe I'll feel ambitious tomorrow o_O


The two projects I checked had "Copyright AppsAmuck.com 2008. All rights reserved." in every file ...


I don't think that was their intention. They might be open to github.

By default, when you create a new file, XCode adds a standard preamble header:

Copyright __MyCompanyName__ __Year__ . All rights reserved.


I hadn't gone so far as to investigate that yet.

Oh well.

Perhaps we can get them to budge :x


Anyone know of anything similar for Rails apps? Or even Django, PHP, Sinatra, etc apps?


Not quite that but I love http://guides.rubyonrails.org/


There's this good blog that shows example apps and occasionally has articles about best practice for Ruby on Rails. It is, however, 2 years old but should be close enough for learning Rails 2.3. http://originblog.wordpress.com

EDIT: check out this StackOverflow post too - http://stackoverflow.com/questions/193632/where-can-i-find-g...


For Django look at open source apps. Registration is a good one to start.

There are enough high quality apps to give you an idea of best practices.


For rails, check out http://www.railstutorial.org.


opensourcerails.com has quite a few open source ones


I took a look at a few of the apps, and many of them contain plenty of clunky programming leading to severe performance inefficiencies (read: battery life inefficiencies) that could lead to very bad habits being picked up by a fledgling, but I still consider this resource a pretty good starting point. Don't forget to update the Base SDK setting before playing around with the projects, as the sources are a bit out-of-date and won't properly compile against newer SDKs.


I'm still very much learning about the "wizard behind the curtain" stuff that makes apps run more smoothly - like NSOperation and background threads and GCD, best practices for CoreData, memory optimization using Instruments.

Can you please recommend any code examples and/or resources to learn more about iOS performance and code optimization? The WWDC 10 session videos on performance that I saw (131, 137, 147) that I tried to understand were enlightening.


Sadly I am not aware of any specific resources on iOS performance tricks or optimizations. You might find something of use in Aaron Hillegass' beginner's book on iPhone development (on http://www.bignerdranch.com/) - his previous book on Cocoa has gotten a lot of praise, and there's a good chance that his iPhone dev book holds the same quality.

The things I commented about in the code examples were mainly general cases of bad programming; f.e., one of the applications did a frame rendering pass via a loop that ran 100k times per frame, and as the first thing in each run of the loop (instead of just once at the start of the application) it initialized a few variables that end up having the same value through the entire run of the application, resulting in the unnecessary addition of 200k function calls with consequential variable declarations per frame, totalling 6 or 12 million extra function calls PER SECOND, depending on if the application rendered in 30 fps or 60 fps. While it might not look like a big mistake, things like these are easily picked up by people who might consider it sane, healthy and clean programming from an "engineering" perspective, but even the smallest mistakes can be the best recipees for killing handheld battery life and producing lousy software.




Consider applying for YC's first-ever Fall batch! Applications are open till Aug 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: