PDA

View Full Version : osx programming book




me hate windows
Feb 17, 2003, 10:38 PM
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:)



rainman::|:|
Feb 17, 2003, 11:08 PM
well you have to decide on a programming language first.

try java, perhaps.

you can learn about programming specific to OS X at

developer.apple.com

pnw

Catfish_Man
Feb 17, 2003, 11:13 PM
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.

Cocoa/Java:
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

Java:
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.

C/C++:
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.

Applescript:
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?

me hate windows
Feb 19, 2003, 07:06 PM
does anybody know what most games are programmed with? I want to make some small, dinky games. And maybe do something bigger.

janey
Feb 19, 2003, 07:44 PM
perl is not a programming language.
if you want to make a simple game just get coldstone (http://www.ambrosiasw.com/games/coldstone/). it's decent and cheap and programming isn't really necessary.

iShater
Feb 21, 2003, 11:03 AM
Originally posted by übergeek
perl is not a programming language.
if you want to make a simple game just get coldstone (http://www.ambrosiasw.com/games/coldstone/). it's decent and cheap and programming isn't really necessary.

I hope you are being picky and saying "Perl is a scripting language" rather than a programming language. Perl rocks! :p

iShater
Feb 21, 2003, 11:10 AM
Originally posted by Catfish_Man
Well, there are a lot of ways to do programming in OSX. Here's a brief summary:

Java:
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/C++:
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.

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.

Any questions?

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

janey
Feb 21, 2003, 08:56 PM
Originally posted by iShater
I hope you are being picky and saying "Perl is a scripting language" rather than a programming language. Perl rocks! :p
That's what I meant...I like perl too!

Doctor Q
Feb 24, 2003, 06:02 PM
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!