Jump to content
solanderdog

Mac Programming

Recommended Posts

Hello all,

 

My 10-year-old son wants to learn to program. We bought "Cocoa Programming for Dummies" but it seems a little out of date. When we built the first project, we had to figure out a lot of things and it became obvious that a lot has changed in Xcode since this book was written. My son's friend tells him he should be learning C++. Is there a good book that relates to Mac that anyone could recommend? I'm a little at a loss. When I was into programming, one just turned the Commodore 64 on and Basic was ready to go. Things seem rather much more complicated now.

 

Help!

 

Thanks,

Tony

Share this post


Link to post
Share on other sites
Hello all,

 

My 10-year-old son wants to learn to program. We bought "Cocoa Programming for Dummies" but it seems a little out of date. When we built the first project, we had to figure out a lot of things and it became obvious that a lot has changed in Xcode since this book was written. My son's friend tells him he should be learning C++. Is there a good book that relates to Mac that anyone could recommend? I'm a little at a loss. When I was into programming, one just turned the Commodore 64 on and Basic was ready to go. Things seem rather much more complicated now.

 

Help!

 

Thanks,

Tony

 

It probably depends on what kind of programming your son wants to start with. The easiest starting point is probably learning to program AppleScript. I have used "Beginning AppleScript" by Stephen Kochan and found it to be a pretty good place to learn.

 

If he's a bit more adventurous and wants to get into lower-level programming, Objective-C is the language of choice for many Mac applications. The only book I've used is "Cocoa Programming for Mac OS X" by Aaron Hillegass. Not sure how up-to-date it is, but when I went through it not too long ago it seemed to be consistent with what I see in XCode. Of course I'm sure the newest version of XCode (due out with Leopard, I believe) will change significantly.

 

As far as C++, it's a great language to learn if your son wants to go beyond Mac programming. Objective-C is used almost exclusively on Macs, whereas C++ is used in a lot of other places. As a result, C++ tends to be more "generally useful" than Objective-C. Then again, if the most "generally useful" language is what you want your son should probably be looking at Java, PHP, or .Net languages. So, which language your son focuses on will depend on what kind of programs he wants to write. If he only cares about the Mac, Objective-C would be a good one to learn.

 

- Tim

Share this post


Link to post
Share on other sites

Cocoa, C++, and even C, IMHO, aren't really the easiest languages to be beginning on. Therefore I would personally like to suggest that your son learn Python first as it is a much more intuitive language, making learning much easier, especially for beginners. Python is just about as powerful as C++, but it's without all the messy syntax that comes with C++. And since Python is so closely related to many other languages, once you get python down it will be much easier to learn others.

 

The best part is, is that python is already installed onto your computer! :) Just open up the terminal and type "python" and hit return and you enter the python environment. From there you can fool around with little bits of code such as:

x=5 <return>

y=3 <return>

x+y <return>

8

(to exit the python environment use the ctrl + d key combo)

 

Of course you can put this into a file say example.py:

x=5

y=3

print x+y

 

and run the script by typing "python example.py" and hitting return.

 

There's tons of info about python on the web, and there are a number of books to learn from. At the university that I am currently attending, all of the computer science majors who haven't programed before learn python before learning C or C++, and I do a lot of python programming for my work. So I hope this helps and good luck! ;)

Share this post


Link to post
Share on other sites

As a 14 year old, I would agree that Cocoa/C++ is not the easiest to begin learning. I recommend Applescript. It's really easy and does not have that many weird function names (ex: printf, %d\n).

Share this post


Link to post
Share on other sites

What about Ruby, although its not a very popular application programming languages, it has a very simple syntax. It allows new programmers to focus on the core concepts of object oriented programming, without the complexities of using Java or C++.

Share this post


Link to post
Share on other sites
What about Ruby, although its not a very popular application programming languages, it has a very simple syntax. It allows new programmers to focus on the core concepts of object oriented programming, without the complexities of using Java or C++.

 

 

All this talk about which language to use misses the important questions, in my opinion. What kind of programs is your son interested in writing? How much do you want to simplify things given his young age? The selection of language will depend on your answers to these 2 questions.

 

- Tim

Share this post


Link to post
Share on other sites

I started off programming with delphi. It was pretty simple to get to grips with.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing

    No registered users viewing this page.

  • Who's Online (See full list)

    There are no registered users currently online

×