Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

KeeeeenW

macrumors member
Original poster
May 19, 2009
66
2
Hi guys,

Probably you guys have seen this a thousand times but I just want to ask shall I learn C language before moving to Objective-C?

I've studied JAVA for one year in my high school but I could not follow the iPhone Developer Courses from Stanford, because I could not understand some syntax and concepts which I believe are derived from C.

If I should learn C first, what's the best book I can buy?

What should I do after learning C?(Check out the iPhone Courses again? Or learn Objective-C language? )

Thanks XD
 
I'd say dive right into Objective-C.

I only had a year of Java in high school and still was able to grasp iOS development (though it took me a few months because I was on my own).

Unless you're going for lower level programming, C won't help you too much. I'd actually go as far to say that a Java background is more useful than C in terms of iOS development.
 
I'd say dive right into Objective-C.

I only had a year of Java in high school and still was able to grasp iOS development (though it took me a few months because I was on my own).

Unless you're going for lower level programming, C won't help you too much. I'd actually go as far to say that a Java background is more useful than C in terms of iOS development.


Ok...Thanks... That encourages me a lot!
 
As an Amazon Associate, MacRumors earns a commission from qualifying purchases made through links in this post.
Thank you for your recommendation. I've checked out the book on the Amazon. Do you know when the author is going to release the 3.0 version?

Programming in Objective-C came out in 2003
Programming in Objective-C 2.0 came out in 2009

if one assumes that he has a 6 year gap between publishing editions of his books, you are looking at 2015 :rolleyes:
 
Programming in Objective-C came out in 2003
Programming in Objective-C 2.0 came out in 2009

if one assumes that he has a 6 year gap between publishing editions of his books, you are looking at 2015 :rolleyes:

Ok~ haha
 
I suggest learning the basics of C first, especially all the data types, control structures, and the use of pointers, but moving on to Objective-C before writing any big applications.
 
I suggest learning the basics of C first, especially all the data types, control structures, and the use of pointers, but moving on to Objective-C before writing any big applications.

Thanks for your advise!
 
What firewood said.
You don't need to learn C extensively, but understand the fundamental concepts, the syntax and the basics on memory management, very important, especially as you come from Java where that's basically a foreign concept.
 
Why not Smalltalk ?

If you insist on learning another language before delving into Objective C, maybe Smalltalk is a better choice ;-)

Jean-Louis
 
C isn't a very big language. If you exclude the function libraries, it's entirely possible for anyone to know the whole language backwards and forwards.

If you just skip the C and go straight into Objective-C, there are going to be times where things look unfamiliar or intimidating. If you build a Cocoa app and you ever have to work with Core Graphics, Core Foundation, the Address Book, or any other lower-level APIs, you'll be glad that you're good with C.
 
Probably you guys have seen this a thousand times but I just want to ask shall I learn C language before moving to Objective-C?

Learn C first. It's the language that ObjC was built upon. If you don't have a good grasp of it there is the risk that you will become too reliant upon ObjC's conveniences, in the way that C++ programmers do. People who learn OOP languages first are at greater risk of becoming sloppy. Always learn procedural programming before OOP.
 
If you don't have a good grasp of it there is the risk that you will become too reliant upon ObjC's conveniences, in the way that C++ programmers do.
And that's totally OK in 2010. If you're going to code for iOS and Mac OS X, it's probably more important to know about OOP stuff like classes, protocols and delegates rather than "waisting" your time figuring out how a C pointer works. Remember, iOS has no garbage collection you could be lazy about anyways and encourages you to care about your memory management. Or the concept behind table cell reuse, you can apply that to pretty much anything.

Once you hit CF or AB, you'll dive into C anyways - even if they're pretty much Obj-C-like, as even those have convenience functions like XYZCreate() and XYRelease() rather than malloc and free.

Go for Obj-C, chances are you'll never need "proper C". If you do, grab some "C Compact Reference" and read. As you'll be already familiar with basic terms, it'll be much easier to understand than doing it from scratch. Yes, you'll be screwed up by Obj-C, but that doesn't seem like a big deal, unless you expect Apple to go out of business soon.

Oh, and digg this. (Or this, whichever you may prefer)
 
Last edited:
C isn't your problem

I'm taking the Stanford course myself. I know C, C++, C# and Java (among others). If you are having problems with the course content and know Java (or some other C derivative language) - you PROBABLY don't have a problem understanding the syntax (Objective-C and Java are "close enough" that you should get the C parts of the language without too much trouble). The non-Java/C parts of the language are taught in the class.

What's probably throwing you is the object oriented stuff. The instructor even says that right at the beginning of the first class. Get a book (or take a class) on Object Oriented Programming/Design. If you don't know what terms like: Class, Object, Instance, Instantiation, Inheritance, Interface, Implementation, Message, Method, Member Variable, Constructor, Destructor, Garbage Collection and Polymorphism mean - then you will be way behind the curve. And in this class - you won't survive long if you fall behind.

I think Smalltalk would just confuse you - O-C has SOME Smalltalk in it - but if you can read Java syntax, you should be fine. Concentrate on the OO concepts.

That being said - the course is not for the faint-of-heart. The instructor doesn't spend a whole lot of time on any one point - he gives you the concept, then moves on. If you space out for 5 minutes during the lecture - you better back up and find out what you missed (thats what the rewind button is for). The assignments take 4-6 hours if you are really good (or lucky). The extra credit items can push that time up quite a bit. This is a class for hard-core Computer Science geeks (with a GPA high enough to get into Stanford)- techno-wimps and wanna-bees need not apply. When you complete this class - you'll know what you are talking about - but you're going to have to work hard to get there.
 
And that's totally OK in 2010.

Unless the programmer needs to debug their way out of a subtile typo (which can still occur in the C portion of an "all" ObjC app), or a memory, CPU performance or battery life problem occurring at some lower level.

I've seen some pretty serious time-wasting screw-ups from programmers who thought they could get by, writing large non-trivial applications, but knowing only the high-level "good parts" of a programming language.

Don't be the next one.
 
IIRC, it only requires CS106B, which should be Programming Abstractions.

CS106B is about C/C++ though, so you'd learn those basics first.

I'd rather suggest to have a look into Programming Methodology (Tells you what stack and heap are, pointers, … so you rather need that one for proper debugging), Programming Paradigms and the Programming Abstraction courses. These are pretty much the main programming introductory courses in the computer science department of Stanford. The MIT has pretty good courses on iTunes-U, too, but these really blow your mind. Introduction to Computer Science and Programming is pretty helpful to take a look at, though. This is concrete stuff that really matters.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.