osx programming book

Discussion in 'Mac Help/Tips' started by me hate windows, Feb 17, 2003.

  1. me hate windows macrumors 6502

    me hate windows

    Jan 18, 2002
    I want to learn some basic programming skills for osx. Does anyone know of a good book for a beginner? and cheap. Or any other ways of learning would be good.

    Thanks in advance:)
  2. rainman::|:| macrumors 603


    Feb 2, 2002
    well you have to decide on a programming language first.

    try java, perhaps.

    you can learn about programming specific to OS X at


  3. Catfish_Man macrumors 68030


    Sep 13, 2001
    Portland, OR
    Well, there are a lot of ways to do programming in OSX. Here's a brief summary:

    Cocoa/Objective C:
    Good: Powerful, Comparatively easy, based on C, can mix Objective-C and C++ code.
    Bad: No other systems use Objective C, memory management isn't as nice as Java, very different from other APIs (such as carbon)
    How To: Look on Amazon for "Learning Cocoa with Objective C", then find a good book on C. Use project builder and interface builder to make programs.

    I don't know much about this, but it's basically the same as the one above, just using Java instead of Objective C (Objective C is descended from C, Java is descended from C++ which comes from C. They're fairly similar to work with).
    Good: Easy memory management, can use standard Java libraries, Java is a very common language
    Bad: Slow (but getting better)
    How To: Not sure about books, uses project builder and interface builder

    Good: Runs on almost any computer, good memory management, decent toolkit (API)
    Bad: Slow, doesn't use platform specific features very well.
    How To: Again, O'Reilly books are good, but you really shouldn't have trouble finding Java books. Uses project builder or terminal.

    C++(and others)/Carbon:
    Good: Can be OS9 compatible, a bit faster
    Bad: Missing a few features, Carbon isn't object oriented, worse memory management than Objective C or Java (less friendly, but faster)
    How To: There're tons of C++ books out there, and Carbon is pretty much like the old OS9 toolkit. The Apple Developer Connection (developer.apple.com) has some good carbon documentation/examples. Uses project builder.

    Good: Very fast, cross platform, good for learning basics (not as good as Java, imho)
    Bad: Can't do graphics without some sort of tools (OpenGL, Quartz, Qt, DirectX, etc...) that usually tie you to a platform, same memory management as above, C isn't object oriented.
    How To: There are about a billion books, compilers, and tools for C/C++. It shouldn't be too hard to find some. Project builder and GCC (through terminal) work.

    Not really a programming language, but can be useful. Fairly easy, although it has annoying syntax. Can be used to control other programs. Used through script editor or project builder.

    Perl: Don't know

    Shell Scripts: Don't know

    REALBasic: Easy, not too powerful until you start hooking C code to it. Has lots of premade things you can download. Not free.

    BASIC: Eh.

    Object LOGO: Fun, not that useful, afaik

    FORTRAN: Really really fast, sucks to work with though. Don't bother with it.

    LOGO: Eh.

    Others (PROLOG, LISP, Pascal, Smalltalk, etc...): Don't know much about these. Ranges from the bizarre but cool (LISP) to the old and not that useful (Pascal, PL/1, Simula)

    To get the developer tools (Project Builder, Interface Builder, etc...), sign up for a free account on the ADC website and download them.

    Any questions?
  4. me hate windows thread starter macrumors 6502

    me hate windows

    Jan 18, 2002
    does anybody know what most games are programmed with? I want to make some small, dinky games. And maybe do something bigger.
  5. janey macrumors 603


    Dec 20, 2002
    sunny los angeles
  6. iShater macrumors 604


    Aug 13, 2002
    I hope you are being picky and saying "Perl is a scripting language" rather than a programming language. Perl rocks! :p
  7. iShater macrumors 604


    Aug 13, 2002
    Java : 100% agree. It is the language of choice for cross-platform applications. If you want your code to run on different OSes, etc, go with Java. You will find lots of books out there, my recommendation is the Deitel and Deitel book.

    C/C++ : Harder to use than Java. If you stick to ANSI C and C++ you can recompile your code to different platforms as long as you don't use any native APIs. Very fast, free GCC compiler included.

    Perl : scripting interpreted language, good for CGIs and system scripts. Most of the scripts run on different platforms as long as those have the interpreter installed.

    Shell scripts : different ones out there, they mainly allow you to control your system, they come in handy to create batch commands to maybe backup files, etc.

    REALBasic: I havn't used this one, but from what I saw and read about it, it is a very good rapid development solution. And I think the latest version allows you to compile Mac and Windows binaries, which is a great plus.

    Think what you would like to use the programming for and then decide what to go for. I personally think it is a good idea to learn more than one language so you understand them and can use them, then focus on your favorite and become and expert in it.

    Of course in my case I do SmallTalk for my company, and that wouldn't be an option for you! :D
  8. janey macrumors 603


    Dec 20, 2002
    sunny los angeles
    That's what I meant...I like perl too!
  9. Doctor Q Administrator

    Doctor Q

    Staff Member

    Sep 19, 2002
    Los Angeles
    If we're being picky about programming languages vs. scripting languages, then we should count "AppleScript" and "Shell Scripts" among the scripting languages. But I don't think the distinction is very important in this case, any more than distinguishing interpreted languages from compiled languages would be.

    I've written games in BASIC and C, but you'd have to have a real love for shell scripts to try writing a game program that way, unless its a command-line game like "guess a number" or NIM!

Share This Page