Begginer developer for Mac OSX.

Discussion in 'Mac Programming' started by iQuit, Jun 5, 2005.

  1. iQuit macrumors 6502a

    iQuit

    Joined:
    May 13, 2005
    #1
    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.
     
  2. DXoverDY macrumors 6502a

    Joined:
    Apr 19, 2005
    #2
    ...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
     
  3. outerspaceapple macrumors regular

    outerspaceapple

    Joined:
    May 23, 2004
    Location:
    Minnetonka, MN USA
    #3
    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
     
  4. DXoverDY macrumors 6502a

    Joined:
    Apr 19, 2005
    #4
    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.
     
  5. mrzeve macrumors 6502a

    Joined:
    Jan 25, 2005
    #5
    Will one be able to make cross platform (osx-windows) applications in xcode?
     
  6. savar macrumors 68000

    savar

    Joined:
    Jun 6, 2003
    Location:
    District of Columbia
    #6
    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.
     
  7. tamara6 macrumors regular

    Joined:
    Apr 28, 2004
    #7
    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.
     
  8. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #8
    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.
     
  9. DXoverDY macrumors 6502a

    Joined:
    Apr 19, 2005
    #9
    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"
     
  10. DXoverDY macrumors 6502a

    Joined:
    Apr 19, 2005
    #10
    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.
     
  11. admanimal macrumors 68040

    Joined:
    Apr 22, 2005
    #11

    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.
     
  12. admanimal macrumors 68040

    Joined:
    Apr 22, 2005
    #12
    How dare you confuse Knuth with another, lesser author. May the Computer Science gods have mercy on your soul! :)
     
  13. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #13
    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.
     
  14. Nuc macrumors 6502a

    Nuc

    Joined:
    Jan 20, 2003
    Location:
    TN
    #14
    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
     
  15. patseguin macrumors 65816

    patseguin

    Joined:
    Aug 28, 2003
    #15
    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?
     
  16. javiercr macrumors 6502

    javiercr

    Joined:
    Apr 12, 2005
    Location:
    London
    #16
    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 .
     
  17. vatel macrumors member

    Joined:
    May 6, 2005
    #17
    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.
     
  18. DXoverDY macrumors 6502a

    Joined:
    Apr 19, 2005
    #18
    the coding will all be the same. nothing changes there. learn what you will, it'll be the same.
     
  19. caveman_uk Guest

    caveman_uk

    Joined:
    Feb 17, 2003
    Location:
    Hitchin, Herts, UK
    #19
    Just watch out for endian issues...
     
  20. tjwett macrumors 68000

    tjwett

    Joined:
    May 6, 2002
    Location:
    Brooklyn, NYC
    #20

Share This Page