Starting out with Objective-C
I recently decided to embark on a personal challenge to learn Objective-C (the programming language behind Mac and iPhone applications) so that I could one day get applications into the App Store. I'm not looking to make millions with a fart machine app, but I do want to see some of my ideas come to fruition and end up on some iPhones. While we've previously mentioned how to delve into programming in Objective-C, there have been some recent releases of educational materials that can help those who want to learn the language:Programming in Objective-C 2.0 (book, $44.99)
This is the latest release of Stephen Kochan's series which some consider to be the Objective-C bible. It has a wealth of information jammed into almost 600 pages, and it will take you from simple variable assignments to advanced class implementation. I'm over halfway through this book, and the text is easy to read (not too high level), and is broken up in a visually appealing style with sufficient whitespace to be gentle on your eyes. If you're only interested in programming for the iPhone, you may only want to rely on this book for its wealth of foundational Objective-C material as it only has one chapter devoted to the iPhone.
Learning Objective-C on the Mac/Beginning iPhone Development (books, $39.99 each)
This new series from Apress offers two options to would-be developers. If you're comfortable with Objective-C, grab their iPhone book and begin learning about the SDK and how to implement the iPhone features. If you're new to the language, pick up the first book to build a foundation so that if you decide to program for the iPhone, you'll be prepared.
Coding in Objective-C (screencasts, $5 per episode)
This is currently my favorite way to learn the language. While the company behind these high-quality screencasts, Pragmatic Programmers, has only released 2 episodes for Objective-C so far, they are a great way to learn thanks to the usage of audio and video. Being able to see the code change and grow and hearing the host's voice explain exactly what is going on is much more engaging than reading a book. The screencasts last about 45 minutes per episode.
These are only a few ways to learn Objective-C. Apple makes plenty of sample code available, and with the removal of the iPhone development NDA more and more blogs and books are coming available making it easier to learn and reducing the time to get creations finished. If you are already familiar with Object Oriented Programming (languages like Java and C++), learning Objective-C should be a snap.
Share
I recently decided to embark on a personal challenge to learn Objective-C (the programming language behind Mac and iPhone applications) so...
Add a Comment
Jason, how do you think that would work? I have just started working with Hillegas, and Saduns 'iPhone Cookbook' (not having done Mac programming since Lightspeed Pascal on my SE, but with a more recent smattering of PHP, PERL and a dab of C). I too am interested in the 'do's and don'ts' and am a bit overwhelmed by having to learn everything at once.
Anyway, your idea does sound interesting, so I'd like to hear more of what you're thinking.
Now that I've written a few apps, I've considered taking on an apprentice as a way to reduce the amount of time I spend maintaining my existing code so that I can focus on "the new".
The benefit of course for the apprentice is a chance to "wade into" iPhone App development without having to learn everything at once. When they get to a point where they are ready to do it themselves, they can strike out on their own.
I'm not a new programmer, so I don't know, but do those of you getting started find this idea intriguing?
I'm in high school and have been working through Hillegass's book over the past couple of weeks. Before that, I read Teach Yourself C++ in 21 Days and C++ Primer Plus, so I had C++ down (which I wanted to) When I say I learned C++, I mean that loosely, in that I have a vague grasp but would need to code a project before everything coalesced.
Working through cocoa/objective-c has been interesting... a few roadblocks, and at times, hillegass seems to be "winging out methods left and right," almost as if it was a cookbook. Overall, I'm learning a lot, but it's an uphill road for a high schooler who's never had a computer science course :-) I'm getting there, though. Chapter 27/35! Before this, I also self-taught myself (X)HTML, CSS, and a little PHP, so this was definitely a major transition. I'm looking forward to writing an app soon, though, and pulling all the pieces together.
hi there everyone.
I'm a student who wants to give programing a go, i have no experience.
I'd like to develop a few iphone apps and maybe a few mac ones too.
what language should i learn?
is objective-C the same as Cocoa? is C carbon? and what is C++?
thanks
Objective-C is not the same as Cocoa. Cocoa isn't a programming language. It's a development framework written in Objective-C. Carbon is the name of an older Apple framework written in C. Carbon is being phased out and Cocoa is (has) taking its place.
C++ is another programming language with "C like" syntax but with OOP (object oriented programming) in mind. And of course Objective-C is C with OOP support added on.
I'd take an intro to computer science course before getting your hands dirty.
"Programming in Objective-C", the first edition, was one of the worst introductory programming books I've ever seen. Granted I bought it as a reference tome, but I've found myself looking online rather than in the book nine times out of ten when I need a question answered.
Then again, Hillegas' books have been even more droll, useless, and uninspiring, so maybe you're better off picking this one up anyway...
"Oh well, I don't think it's such a good idea to go from only experience with scripting/managed programming languages to something like Objective-C at all. I think the only good foundation for any C-based language is having a proper understanding of C (as the name implies). Otherwise there is going to be so much memory leakage on the app store, we're all going to be rebooting our phones every hour or so. So please, pick up a proper book on C first! Not trying to sound arrogant, just trying to help with the subject. Anyway, have fun!"
Which is EXACTLY why I think that compilers, not programmers are still in the pre-Model T stages. For those of you who don't know, Ford Model T cars were made in the early 1900s.
Computers have been fast enough for a long time now to have compilers determine what is the best memory management for that computer.
It's about time someone created a new programming language that is like Java/C with a compiler that does rock hard scientific analysis of programs to determine the best memory management for that program.
I know, I know, I know, I know, you "think" people are better at this than computers. Then why have a compiler at all if human are so smart and better? Why not program in machine language? Because they used to do that and found it is not as easy as programming in a language that humans are used to.
Where humans are used to memory management and the vast majority of them are not good at it at all. Good enough should stop being good enough.
I've got an idea. How about writing a language where 99% of your energy is spent on the functionality of the program and debugging (which there would be a lot less need for) and not 40%+ of your time doing memory management and leaving a bunch of memory holes.
I'm not talking BASIC and so forth here as I doubt that you would build something complex in BASIC. Try programming DOOM 3 or a word processor in BASIC or PHP or ... I mean a real BIG one like most people use on their desk. Well, lots better than Word which just barely adequate and is a mess programming wise.
There needs to be a new compiler that does memory management for programmers. Sure it would take time and if I had the intelligence and attention span I would try to do it myself. I don't.
Which leads people to believe that I can't program. I've programmed in quite a few languages including C which I did in the 80s and 90s including financial and mortgage software including transactional/rollback databases.
Now, being able to and ENJOYing programming in C are two different things. I've enjoyed several different languages but have never enjoyed C. I'd much rather focus on what I want my program to do than spend all that time doing memory management and debugging it.
Nice book... BTW, I expected this post from Erica.
http://cocoadevcentral.com/
I was just reading the objective-c introduction last night. It's a bit hurried and needs to be read slowly and several times to fully understand. Also I think if you don't have previous experience with C/C++, this objective-c intro is in my opinion too harsh.
That's pretty timely, I'd just ordered this book and it arrived about an hour before the article was posted.
January 16 2009 at 9:08 AM Report abuse Permalink rate up rate down ReplyK-Boom goes my brain :(
January 16 2009 at 5:47 AM Report abuse Permalink rate up rate down ReplyHot Apps on TUAW
Deals of the Day
more deals- Verizon Leather Sleeve for Tablets for $4 + free shipping
- Wicked Jaw Breaker Noise-Isolating In-Ear Headphones for $6 + free shipping
- Refurb Apple MacBook Air Laptops: 12" 64GB SSD for $699 + free shipping
- JVC Motion Sensing Clock Radio with Dual iPod Docks for $55 + free shipping
- Apple iPhone Headset with Mic for $4 + $2 s&h
- Refurb Apple iPod nano 8GB MP3 Player for $99 + free shipping, 16GB for $119
Software Updates
more updates- EFI Firmware Update brings Lion Internet Recovery to 2010-model Macs
- OS X Lion 10.7.3 released with Safari 5.1.3, Wi-Fi bug fix
- Aperture updated to 3.2.2, addresses Photo Stream issue
- Apple updates Keynote to address Lion issues
- Google Search app gets new look on iPad
- Apple releases Apple TV Software Update 4.4.3



50 Comments