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

iQuit

macrumors 6502a
Original poster
May 13, 2005
529
9
Los Angeles
I want to start developing using Xcode for OSX and I am 14 years of age,I am very computer literite. I am looking into buying a book that is very simple and will guide me through the whole process of knowing the C language,C language should be my best bet for OSX,some say try to use Cocoa but it is not really for beginners. I have found multiple books on Amazon.com such as C programming for Dummies,except how good would these be considering I am using a Unix based Machine and not DOS?What would be a good book for me to learn on a Mac and what are your suggestions? I was thinking finding a book,opening Xcode and go from there. It is very hard to find beginner guides to OSX programming so someone please help me out,I'm new. thanks a lot.
 

DXoverDY

macrumors 6502a
Apr 19, 2005
810
0
iQuit said:
I want to start developing using Xcode for OSX and I am 14 years of age,I am very computer literite. I am looking into buying a book that is very simple and will guide me through the whole process of knowing the C language,C language should be my best bet for OSX,some say try to use Cocoa but it is not really for beginners. I have found multiple books on Amazon.com such as C programming for Dummies,except how good would these be considering I am using a Unix based Machine and not DOS?What would be a good book for me to learn on a Mac and what are your suggestions? I was thinking finding a book,opening Xcode and go from there. It is very hard to find beginner guides to OSX programming so someone please help me out,I'm new. thanks a lot.

...beginner...

literate... hmm..

Ok, Cocoa is for building GUI applications. Like Safari or TextEdit and that type of application. The language used is Objective-C, it's sort of a mix between C and well... C++ but without the cruft, although different enough to make things tricky.

C will only get you console (text only) applications in the terminal.

XCode will do all of this. For cocoa apps I recommend Knuth's Objective-C book, and Cocoa Programming for Mac OS X

http://www.bignerdranch.com/products/

For C only... obviously the C Programming Language by K&R
 

outerspaceapple

macrumors regular
May 23, 2004
190
0
Minnetonka, MN USA
DXoverDY said:
...beginner...

literate... hmm..

Ok, Cocoa is for building GUI applications. Like Safari or TextEdit and that type of application. The language used is Objective-C, it's sort of a mix between C and well... C++ but without the cruft, although different enough to make things tricky.

C will only get you console (text only) applications in the terminal.

XCode will do all of this. For cocoa apps I recommend Knuth's Objective-C book, and Cocoa Programming for Mac OS X

http://www.bignerdranch.com/products/

For C only... obviously the C Programming Language by K&R

I ordered my copy to thanks to your suggestion. I figure, Its been 3 years (on and off) I've tried to figure out this whole XCode thing w/o a reference manual... its about time i got one.


:D
 

DXoverDY

macrumors 6502a
Apr 19, 2005
810
0
outerspaceapple said:
I ordered my copy to thanks to your suggestion. I figure, Its been 3 years (on and off) I've tried to figure out this whole XCode thing w/o a reference manual... its about time i got one.


:D

i will make note that Cocoa is not easy to learn. It's pretty layered so stick with it and you will learn it. I had to repeat the stuff in the book about 3 times before i totally understood what was going on. Just stick with it, the book is also for xcode 1.2+.. it doesn't cover 2.0+ so expect things to be a "little" different.
 

mrzeve

macrumors 6502a
Jan 25, 2005
617
1
DXoverDY said:
...beginner...

literate... hmm..

Ok, Cocoa is for building GUI applications. Like Safari or TextEdit and that type of application. The language used is Objective-C, it's sort of a mix between C and well... C++ but without the cruft, although different enough to make things tricky.

C will only get you console (text only) applications in the terminal.

XCode will do all of this. For cocoa apps I recommend Knuth's Objective-C book, and Cocoa Programming for Mac OS X

http://www.bignerdranch.com/products/

For C only... obviously the C Programming Language by K&R

Will one be able to make cross platform (osx-windows) applications in xcode?
 

savar

macrumors 68000
Jun 6, 2003
1,950
0
District of Columbia
iQuit said:
I want to start developing using Xcode for OSX and I am 14 years of age,I am very computer literite. I am looking into buying a book that is very simple and will guide me through the whole process of knowing the C language,C language should be my best bet for OSX,some say try to use Cocoa but it is not really for beginners. I have found multiple books on Amazon.com such as C programming for Dummies,except how good would these be considering I am using a Unix based Machine and not DOS?What would be a good book for me to learn on a Mac and what are your suggestions? I was thinking finding a book,opening Xcode and go from there. It is very hard to find beginner guides to OSX programming so someone please help me out,I'm new. thanks a lot.

Hey, I know what its like to be interested in programming at your age. I'm 22 now and have been writing software since 5th grade.

I don't know where you got the idea that you should write programs in C, or that Cocoa was hard: wrong on both counts. Learn C first, then learn the objective-C extensions and Cocoa at the same time. Find a book about learning C on unix (since you will be able to use the command line to compile and run your initial programs).

Then I recommend Hillegrass' book on Cocoa...a lot of developers agree that its the best out there.

You should get to Cocoa as fast as possible. It makes application development so easy, none of the BS of Carbon.
 

tamara6

macrumors regular
Apr 28, 2004
228
137
DXoverDY said:
For cocoa apps I recommend Knuth's Objective-C book, and Cocoa Programming for Mac OS X

...

For C only... obviously the C Programming Language by K&R

I think the Objective-C book is by Kochan, not Knuth. It is fairly good, and not a bad place to start.

I found that Cocoa Programming for Max OS X was tough to do after Kochan's book. It assumed an understanding that I had not developed yet, and didn't explain enough of the really basic things. I found Garfinkel and Mahoney's book (Building Cocoa Applications) much more to my liking. After working through most of that book I was able to switch back to the Hillegass book and everything made a lot more sense. That is what worked for me. YMMV.

I also find the K & R book (which stands for Kernighan and Ritchie, by the way) is way too terse for my taste. My husband loves it, but I needed something a little more user friendly. Again, YMMV.

My best advice is to head to a big bookstore where many of these books will be on the shelves. Look them over. You may be able to tell which one will work best for you by just browsing through them.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
mrzeve said:
Will one be able to make cross platform (osx-windows) applications in xcode?

Not using Cocoa or any of the other Apple toolkits (which are OSX only). If you want to be cross platform you can either use Java (and Swing/AWT) or a framework like QT. If you got the Java route you could use Java-Cocoa on OSX and Java-Swing on Windows.
 

DXoverDY

macrumors 6502a
Apr 19, 2005
810
0
tamara6 said:
I think the Objective-C book is by Kochan, not Knuth. It is fairly good, and not a bad place to start.

whoops you are correct. knuth does the Art of Programming or whatever books.. :p too many dang authors stashed in my head i can't keep them all straight anymore... "good delicious library.. good"
 

DXoverDY

macrumors 6502a
Apr 19, 2005
810
0
robbieduncan said:
Not using Cocoa or any of the other Apple toolkits (which are OSX only). If you want to be cross platform you can either use Java (and Swing/AWT) or a framework like QT. If you got the Java route you could use Java-Cocoa on OSX and Java-Swing on Windows.

as stated above in the quote here..

cocoa is NOT what you want to use if you want platform independance. QT or Java are the only real ways to go. However even with QT you will likely have some porting to do to get it to work on windows/os x

Cocoa is like... direct x... it's so ingrained into the system that it typically requires a complete rewrite to get it to work on other systems.
 

admanimal

macrumors 68040
Apr 22, 2005
3,531
2
iQuit said:
I want to start developing using Xcode for OSX and I am 14 years of age,I am very computer literite. I am looking into buying a book that is very simple and will guide me through the whole process of knowing the C language,C language should be my best bet for OSX,some say try to use Cocoa but it is not really for beginners. I have found multiple books on Amazon.com such as C programming for Dummies,except how good would these be considering I am using a Unix based Machine and not DOS?What would be a good book for me to learn on a Mac and what are your suggestions? I was thinking finding a book,opening Xcode and go from there. It is very hard to find beginner guides to OSX programming so someone please help me out,I'm new. thanks a lot.


Hi. It sounds to me like you know what's best for you more than anyone else on the forum here. Learning to program with C before jumping into any GUI stuff with Cocoa is an excellent idea. It's always better to learn how to program in general than to start by trying to learn how to program and learning some (fairly complex) framework like Cocoa at the same time. In fact, my freshman year in college, the intro programming class was taught in Java and they made us write Applets all the time. Then they figured out that this was a horrible idea, because all of the GUI nonsense was distracting the students from actually learning how to program correctly, and by the time I graduated they were only writing console applications (still in Java) in the intro class.

One of the beauties of learning to program in OS X is that you have the free GNU C compiler that you can use to write console-based C applications while you are learning to program. They might not be pretty, but you'll learn more effectively. Of course you can also make console-based Objective-C applications, which would be a fine starting point too- just don't try to get too fancy with object-oriented stuff until you've mastered the basic programming constructs.

All of the "Dummies" programming books are kind of lame, even for a real beginner. I think O'Reilly has a couple decent C books. Practical C is one of them I think, and it might be decent for a beginner. Then there is the famous book The C Programming Language, by Kernighan and Ritchie, the creators of C. You will want to buy this one eventually, but it might not be an ideal starting point for someone your age and experience level, just because it doesn't have too many simple examples in it.
 

admanimal

macrumors 68040
Apr 22, 2005
3,531
2
DXoverDY said:
whoops you are correct. knuth does the Art of Programming or whatever books.. :p too many dang authors stashed in my head i can't keep them all straight anymore... "good delicious library.. good"

How dare you confuse Knuth with another, lesser author. May the Computer Science gods have mercy on your soul! :)
 

jsw

Moderator emeritus
Mar 16, 2004
22,910
44
Andover, MA
While C is a good language to know (there are many languages that are good to know), if you want to get into OS X development you'll need Objective-C, not C, and I strongly recommend learning Objective-C first instead of needing to unlearn things about C (or C++, or Java) which are just enough like Objective-C to confuse you. OS X runs off of Objective-C code. Java code is making inroads in some places, but Objective-C is where it is at, now and in the near term at least.

The books recommended above are good ones, although I've yet to find the "perfect" beginner-to-Objective-C book. I'd also love to find a "Using Xcode 2.x" book, or even a "Using Xcode 1.x" book, but I haven't found any.

I also agree that it's good to learn non-GUI programming as a general rule. However, 95% of any Mac apps you'll ever write will be GUI-centric, so it's a good idea to learn Interface Builder, etc., instead of concentrating on "pure" programming.

Again, this advice is targeted towards learning to develop OS X apps, as opposed to learning to program while just happening to be using OS X.
 

Nuc

macrumors 6502a
Jan 20, 2003
798
6
TN
Question???

Ok I'll repeat a question I asked in another thread since no one has responded....

I've programmed in Fortran (not very efficiently). However, if I were to code in obj-c how does these to compare... I've always understood that fortran is more for engineers (which I am) however what kind of comparison is this to obj-c? I'm looking to possibly write programs (more or less modeling e.g. atmospheric transport) which requires numerical integration and such.

What do you guys suggest...

Nuc
 

patseguin

macrumors 68000
Aug 28, 2003
1,712
511
With the Intel transition coming, is there any reason to hold off on learning C++? Or is the coding the same with xcode handling everything?
 

javiercr

macrumors 6502
Apr 12, 2005
419
0
London
Nuc said:
Ok I'll repeat a question I asked in another thread since no one has responded....

I've programmed in Fortran (not very efficiently). However, if I were to code in obj-c how does these to compare... I've always understood that fortran is more for engineers (which I am) however what kind of comparison is this to obj-c? I'm looking to possibly write programs (more or less modeling e.g. atmospheric transport) which requires numerical integration and such.

What do you guys suggest...

Nuc

Fortran is very good for numerical stuff because that's what is for, it's not designed to do GUIs, graphics etc although the latest compilers can actually do this things (and I've done them) but you would never program a graphics editor, an internet browser, a IM application with fortran .
 

vatel

macrumors member
May 6, 2005
47
0
Ok I'll repeat a question I asked in another thread since no one has responded....

I've programmed in Fortran (not very efficiently). However, if I were to code in obj-c how does these to compare... I've always understood that fortran is more for engineers (which I am) however what kind of comparison is this to obj-c? I'm looking to possibly write programs (more or less modeling e.g. atmospheric transport) which requires numerical integration and such.

What do you guys suggest...

If your doing modeling the only languages you should really be thinking about are Fortran and C++. Objective-C/Cocoa and C#/.NET and (to a lesser extent) Java are all languages heavily oriented towards build GUI type programs.

For numerical modeling, I find that Fortran code always produces faster code, compared to C++, and is usually easier to debug than the other two. I think this is mainly because in Fortran you can ignore memory management, and this is where the nastiest, hardest to find C++ bugs come from.

Personally, I prefer C++. It is, as I said, a bit slow computationally, but if your problems are really complex, it produces a much more managable code structure. Debugging C++ is more difficult, because in addition to logic errors you must often deal with memory allocation errors. There are,however, some nice libraries that allow you to manage this problem more or less invisibly.
 

DXoverDY

macrumors 6502a
Apr 19, 2005
810
0
patseguin said:
With the Intel transition coming, is there any reason to hold off on learning C++? Or is the coding the same with xcode handling everything?

the coding will all be the same. nothing changes there. learn what you will, it'll be the same.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.